@@ -12,6 +12,7 @@ open Microsoft.CodeAnalysis
1212open Microsoft.CodeAnalysis .Completion
1313open Microsoft.CodeAnalysis .Options
1414open Microsoft.CodeAnalysis .Text
15+ open Microsoft.CodeAnalysis .ExternalAccess .FSharp .Completion
1516
1617open Microsoft.VisualStudio .Shell
1718
@@ -48,7 +49,7 @@ type internal FSharpCompletionProvider
4849 |> List.filter ( fun ( keyword , _ ) -> not ( PrettyNaming.IsOperatorName keyword))
4950 |> List.sortBy ( fun ( keyword , _ ) -> keyword)
5051 |> List.mapi ( fun n ( keyword , description ) ->
51- CommonCompletionItem .Create( keyword, null , CompletionItemRules.Default, Nullable Glyph.Keyword, sortText = sprintf " %06d " ( 1000000 + n))
52+ FSharpCommonCompletionItem .Create( keyword, null , CompletionItemRules.Default, Nullable Glyph.Keyword, sortText = sprintf " %06d " ( 1000000 + n))
5253 .AddProperty( " description" , description)
5354 .AddProperty( IsKeywordPropName, " " ))
5455
@@ -73,7 +74,7 @@ type internal FSharpCompletionProvider
7374 // * let xs = [1..10] <<---- Don't commit autocomplete! (same for arrays)
7475 let noCommitChars = [| ' ' ; '=' ; ',' ; '.' ; '<' ; '>' ; '(' ; ')' ; '!' ; ':' ; '[' ; ']' ; '|' |]. ToImmutableArray()
7576
76- CompletionItemRules.Default.WithCommitCharacterRule ( CharacterSetModificationRule.Create( CharacterSetModificationKind.Remove, noCommitChars))
77+ CompletionItemRules.Default.WithCommitCharacterRules ( ImmutableArray.Create ( CharacterSetModificationRule.Create( CharacterSetModificationKind.Remove, noCommitChars) ))
7778
7879 static let getRules showAfterCharIsTyped = if showAfterCharIsTyped then noCommitOnSpaceRules else CompletionItemRules.Default
7980
@@ -152,7 +153,7 @@ type internal FSharpCompletionProvider
152153 | _, idents -> Array.last idents
153154
154155 let completionItem =
155- CommonCompletionItem .Create( name, null , rules = getRules intellisenseOptions.ShowAfterCharIsTyped, glyph = Nullable ( Microsoft.CodeAnalysis.ExternalAccess.FSharp.FSharpGlyphHelpersObsolete.Convert ( glyph)) , filterText = filterText)
156+ FSharpCommonCompletionItem .Create( name, null , rules = getRules intellisenseOptions.ShowAfterCharIsTyped, glyph = Nullable glyph, filterText = filterText)
156157 .AddProperty( FullNamePropName, declarationItem.FullName)
157158
158159 let completionItem =
@@ -198,7 +199,7 @@ type internal FSharpCompletionProvider
198199 }
199200
200201 override this.ShouldTriggerCompletion ( sourceText : SourceText , caretPosition : int , trigger : CompletionTrigger , _ : OptionSet ) =
201- use _logBlock = Logger.LogBlockMessage this.Name LogEditorFunctionId.Completion_ ShouldTrigger
202+ use _logBlock = Logger.LogBlock LogEditorFunctionId.Completion_ ShouldTrigger
202203
203204 let getInfo () =
204205 let documentId = workspace.GetDocumentIdInCurrentContext( sourceText.Container)
0 commit comments