51 references to SnippetsRule
Microsoft.CodeAnalysis.CSharp.Features (3)
Completion\CSharpCompletionService.cs (3)
46var snippetRule = options.SnippetsBehavior; 55if (snippetRule == SnippetsRule.Default) 57snippetRule = SnippetsRule.AlwaysInclude;
Microsoft.CodeAnalysis.EditorFeatures (1)
IntelliSense\AsyncCompletion\CompletionSource.cs (1)
176if (rules.SnippetsRule != SnippetsRule.IncludeAfterTypingIdentifierQuestionTab)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
IntelliSense\VisualBasicCompletionCommandHandlerTests.vb (3)
2612state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.VisualBasic, SnippetsRule.AlwaysInclude) 2633state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.VisualBasic, SnippetsRule.AlwaysInclude) 2655state.Workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.VisualBasic, SnippetsRule.AlwaysInclude)
Microsoft.CodeAnalysis.Features (18)
Completion\CompletionOptions.cs (2)
20public SnippetsRule SnippetsBehavior { get; init; } = SnippetsRule.Default;
Completion\CompletionRules.cs (9)
40public SnippetsRule SnippetsRule { get; } 47SnippetsRule snippetsRule) 70defaultEnterKeyRule, SnippetsRule.Default); 86SnippetsRule snippetsRule = SnippetsRule.Default) 101Optional<SnippetsRule> snippetsRule = default) 107var newSnippetsRule = snippetsRule.HasValue ? snippetsRule.Value : SnippetsRule; 155public CompletionRules WithSnippetsRule(SnippetsRule snippetsRule) 168snippetsRule: SnippetsRule.Default);
Completion\CompletionService.ProviderManager.cs (6)
189var snippetsRule = options.SnippetsBehavior != SnippetsRule.Default 193if (snippetsRule is SnippetsRule.Default or 194SnippetsRule.NeverInclude) 198else if (snippetsRule == SnippetsRule.AlwaysInclude) 202else if (snippetsRule == SnippetsRule.IncludeAfterTypingIdentifierQuestionTab)
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
122SnippetsBehavior = SnippetsRule.NeverInclude,
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Features\Options\CompletionOptionsStorage.cs (2)
50public static readonly PerLanguageOption2<SnippetsRule> SnippetsBehavior = new("dotnet_snippets_behavior", CompletionOptions.Default.SnippetsBehavior, serializer: EditorConfigValueSerializer.CreateSerializerForEnum<SnippetsRule>(), group: s_completionOptionGroup);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (3)
Completion\CompletionResolveTests.cs (1)
359testLspServer.TestWorkspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.CSharp, SnippetsRule.AlwaysInclude);
Completion\CompletionTests.cs (2)
324testLspServer.TestWorkspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.CSharp, SnippetsRule.NeverInclude); 1460testLspServer.TestWorkspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.CSharp, SnippetsRule.NeverInclude);
Microsoft.VisualStudio.LanguageServices.CSharp (8)
Options\AutomationObject\AutomationObject.Completion.cs (1)
50set { SetOption(CompletionOptionsStorage.SnippetsBehavior, (SnippetsRule)value); }
Options\AutomationObject\AutomationObject.ObsoleteAndUnused.cs (3)
50return GetOption(CompletionOptionsStorage.SnippetsBehavior) == SnippetsRule.AlwaysInclude 58SetOption(CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.NeverInclude); 62SetOption(CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.AlwaysInclude);
Options\IntelliSenseOptionPageControl.xaml.cs (4)
30BindToOption(Never_include_snippets, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.NeverInclude, LanguageNames.CSharp); 31BindToOption(Always_include_snippets, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.AlwaysInclude, LanguageNames.CSharp); 32BindToOption(Include_snippets_when_question_Tab_is_typed_after_an_identifier, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.IncludeAfterTypingIdentifierQuestionTab, LanguageNames.CSharp); 52if (snippetValue == SnippetsRule.Default)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
UnifiedSettings\CSharpUnifiedSettingsTests.cs (2)
46return allValues.Where(value => !value.Equals(SnippetsRule.Default)).ToArray(); 66return SnippetsRule.AlwaysInclude;
Microsoft.VisualStudio.LanguageServices.UnitTests (5)
Snippets\SnippetCompletionProviderTests.vb (3)
85workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.VisualBasic, SnippetsRule.AlwaysInclude) 101workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.VisualBasic, SnippetsRule.AlwaysInclude) 117workspace.GlobalOptions.SetGlobalOption(CompletionOptionsStorage.SnippetsBehavior, LanguageNames.VisualBasic, SnippetsRule.AlwaysInclude)
UnifiedSettings\VisualBasicUnifiedSettingsTests.vb (2)
39Return allValues.Where(Function(value) Not value.Equals(SnippetsRule.Default)).ToArray() 55Return SnippetsRule.IncludeAfterTypingIdentifierQuestionTab
Microsoft.VisualStudio.LanguageServices.VisualBasic (6)
Options\AutomationObject\AutomationObject.Completion.vb (1)
41SetOption(CompletionOptionsStorage.SnippetsBehavior, DirectCast(value, SnippetsRule))
Options\IntelliSenseOptionPageControl.xaml.vb (4)
23BindToOption(Never_include_snippets, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.NeverInclude, LanguageNames.VisualBasic) 24BindToOption(Always_include_snippets, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.AlwaysInclude, LanguageNames.VisualBasic) 25BindToOption(Include_snippets_when_question_Tab_is_typed_after_an_identifier, CompletionOptionsStorage.SnippetsBehavior, SnippetsRule.IncludeAfterTypingIdentifierQuestionTab, LanguageNames.VisualBasic) 39If snippetValue = SnippetsRule.Default Then
Snippets\SnippetCompletionProvider.vb (1)
72context.IsExclusive = context.CompletionOptions.SnippetsBehavior = SnippetsRule.IncludeAfterTypingIdentifierQuestionTab