Skip to content

Commit

Permalink
Disable import completion by default
Browse files Browse the repository at this point in the history
  • Loading branch information
genlu committed Oct 21, 2020
1 parent aa0de62 commit fad9d46
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Features/Core/Portable/Completion/CompletionOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ internal static class CompletionOptions
//Dev16 options

public static readonly PerLanguageOption2<bool?> ShowItemsFromUnimportedNamespaces =
new(nameof(CompletionOptions), nameof(ShowItemsFromUnimportedNamespaces), defaultValue: true,
new(nameof(CompletionOptions), nameof(ShowItemsFromUnimportedNamespaces), defaultValue: null,
storageLocations: new RoamingProfileStorageLocation("TextEditor.%LANGUAGE%.Specific.ShowItemsFromUnimportedNamespaces"));

// Use tri-value so the default state can be used to turn on the feature with experimentation service.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ public override async Task ProvideCompletionsAsync(CompletionContext completionC
if (!isExpandedCompletion)
{
var isImportCompletionEnabled = completionContext.Options.GetOption(CompletionOptions.ShowItemsFromUnimportedNamespaces, document.Project.Language);
if (isImportCompletionEnabled == false)
if (isImportCompletionEnabled != true)
{
// This is a tri-value option, default value (null) means disabled
return;
}
}
Expand Down

0 comments on commit fad9d46

Please sign in to comment.