File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
ghcide/src/Development/IDE/Plugin Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -472,10 +472,17 @@ makeCompletions sps lf ideState params@(CompletionParams (TextDocumentIdentifier
472472consumeCompletionResponse :: Int -> CompletionResponseResult -> (Int , CompletionResponseResult )
473473consumeCompletionResponse limit it@ (CompletionList (CompletionListType _ (List xx))) =
474474 case splitAt limit xx of
475+ -- consumed all the items, return the result as is
475476 (_, [] ) -> (limit - length xx, it)
476- (xx', _) -> (0 , CompletionList (CompletionListType False (List xx')))
477+ -- need to crop the response, set the 'isIncomplete' flag
478+ (xx', _) -> (0 , CompletionList (CompletionListType isIncompleteResponse (List xx')))
477479consumeCompletionResponse n (Completions (List xx)) =
478- consumeCompletionResponse n (CompletionList (CompletionListType False (List xx)))
480+ consumeCompletionResponse n (CompletionList (CompletionListType isCompleteResponse (List xx)))
481+
482+ -- boolean disambiguators
483+ isCompleteResponse , isIncompleteResponse :: Bool
484+ isIncompleteResponse = True
485+ isCompleteResponse = False
479486
480487getPrefixAtPos :: LSP. LspFuncs Config -> Uri -> Position -> IO (Maybe VFS. PosPrefixInfo )
481488getPrefixAtPos lf uri pos = do
You can’t perform that action at this time.
0 commit comments