Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita5ef022

Browse files
saulKevinRansom
authored andcommitted
Add option to the "IntelliSense" page to disable "Show all symbols" (#2963)
* Add option to the "IntelliSense" page to disable "Show all symbols"* Update EditorOptions.fs
1 parent56610cc commita5ef022

File tree

6 files changed

+23
-4
lines changed

6 files changed

+23
-4
lines changed

‎vsintegration/src/FSharp.Editor/Completion/CompletionProvider.fs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,10 @@ type internal FSharpCompletionProvider
215215
let!options= projectInfoManager.TryGetOptionsForEditingDocumentOrProject(document)
216216
let!textVersion= context.Document.GetTextVersionAsync(context.CancellationToken)
217217
let!_,_,fileCheckResults= checkerProvider.Checker.ParseAndCheckDocument(document, options,true)
218-
letgetAllSymbols()= assemblyContentProvider.GetAllEntitiesInProjectAndReferencedAssemblies(fileCheckResults)
218+
letgetAllSymbols()=
219+
if Settings.IntelliSense.ShowAllSymbols
220+
then assemblyContentProvider.GetAllEntitiesInProjectAndReferencedAssemblies(fileCheckResults)
221+
else[]
219222
let!results=
220223
FSharpCompletionProvider.ProvideCompletionsAsyncAux(checkerProvider.Checker, sourceText, context.Position, options,
221224
document.FilePath, textVersion.GetHashCode(), getAllSymbols)

‎vsintegration/src/FSharp.Editor/Options/EditorOptions.fs‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ open OptionsUIHelpers
1111
[<CLIMutable>]
1212
typeIntelliSenseOptions=
1313
{ ShowAfterCharIsTyped:bool
14-
ShowAfterCharIsDeleted:bool}
14+
ShowAfterCharIsDeleted:bool
15+
ShowAllSymbols:bool}
1516

1617
[<RequireQualifiedAccess>]
1718
typeQuickInfoUnderlineStyle= Dot| Dash| Solid
@@ -33,7 +34,8 @@ type internal Settings [<ImportingConstructor>](store: SettingsStore) =
3334

3435
store.RegisterDefault
3536
{ ShowAfterCharIsTyped=true
36-
ShowAfterCharIsDeleted=false}
37+
ShowAfterCharIsDeleted=true
38+
ShowAllSymbols=true}
3739

3840
store.RegisterDefault
3941
{ DisplayLinks=true

‎vsintegration/src/FSharp.UIResources/IntelliSenseOptionControl.xaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<CheckBoxx:Name="charDeleted"IsEnabled="{Binding IsChecked, ElementName=charTyped}"IsChecked="{Binding ShowAfterCharIsDeleted}"
2626
Content="{x:Static local:Strings.Show_completion_list_after_a_character_is_deleted}"/>
2727
</StackPanel>
28+
<CheckBoxx:Name="showAllSymbols"IsChecked="{Binding ShowAllSymbols}"
29+
Content="{x:Static local:Strings.Show_all_symbols}"/>
2830
</StackPanel>
2931
</GroupBox>
3032
</StackPanel>

‎vsintegration/src/FSharp.UIResources/Strings.Designer.cs‎

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎vsintegration/src/FSharp.UIResources/Strings.resx‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,9 @@
135135
<dataname="Navigation_links"xml:space="preserve">
136136
<value>Navigation links</value>
137137
</data>
138+
<dataname="Show_all_symbols"xml:space="preserve">
139+
<value>Show s_ymbols in unopened namespaces</value>
140+
</data>
138141
<dataname="Show_completion_list_after_a_character_is_deleted"xml:space="preserve">
139142
<value>Show completion list after a character is _deleted</value>
140143
</data>

‎vsintegration/tests/unittests/CompletionProviderTests.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ let VerifyNoCompletionList(fileContents: string, marker: string) =
8585

8686
[<OneTimeSetUp>]
8787
letusingDefaultSettings()=
88-
SettingsPersistence.setSettings{ ShowAfterCharIsTyped=true; ShowAfterCharIsDeleted=false}
88+
SettingsPersistence.setSettings{ ShowAfterCharIsTyped=true; ShowAfterCharIsDeleted=false; ShowAllSymbols=true}
8989

9090
[<Test>]
9191
letShouldTriggerCompletionAtCorrectMarkers()=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp