Skip to content

Commit cb0b407

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
do not show keywords in completion after dot (#2762)
1 parent 134f98c commit cb0b407

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ type internal FSharpCompletionProvider
8888
asyncMaybe {
8989
let! parseResults, parsedInput, checkFileResults = checker.ParseAndCheckDocument(filePath, textVersionHash, sourceText.ToString(), options, allowStaleResults = true)
9090

91+
//#if DEBUG
9192
//Logging.Logging.logInfof "AST:\n%+A" parsedInput
93+
//#endif
9294

9395
let textLines = sourceText.Lines
9496
let caretLinePos = textLines.GetLinePosition(caretPosition)
@@ -192,7 +194,7 @@ type internal FSharpCompletionProvider
192194
declarationItemsCache.Add(completionItem.DisplayText, declItem)
193195
results.Add(completionItem))
194196

195-
if results.Count > 0 && not declarations.IsForType && not declarations.IsError then
197+
if results.Count > 0 && not declarations.IsForType && not declarations.IsError && List.isEmpty qualifyingNames then
196198
let lineStr = textLines.[caretLinePos.Line].ToString()
197199
match UntypedParseImpl.TryGetCompletionContext(Pos.fromZ caretLinePos.Line caretLinePos.Character, Some parseResults, lineStr) with
198200
| None -> results.AddRange(keywordCompletionItems)

0 commit comments

Comments
 (0)