-
Notifications
You must be signed in to change notification settings - Fork 12
/
MixinsProvider.cs
32 lines (29 loc) · 933 Bytes
/
MixinsProvider.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SassyStudio.Editor.Intellisense
{
[Export(typeof(ICompletionValueProvider))]
class MixinsProvider : ICompletionValueProvider
{
public IEnumerable<SassCompletionContextType> SupportedContexts
{
get
{
yield return SassCompletionContextType.IncludeDirectiveMixinName;
}
}
public IEnumerable<ICompletionValue> GetCompletions(SassCompletionContextType type, ICompletionContext context)
{
switch (type)
{
case SassCompletionContextType.IncludeDirectiveMixinName:
return context.Cache.GetMixins(context.Position);
}
return Enumerable.Empty<ICompletionValue>();
}
}
}