File tree 1 file changed +9
-2
lines changed
ghcide/src/Development/IDE/Plugin
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
472
472
consumeCompletionResponse :: Int -> CompletionResponseResult -> (Int , CompletionResponseResult )
473
473
consumeCompletionResponse limit it@ (CompletionList (CompletionListType _ (List xx))) =
474
474
case splitAt limit xx of
475
+ -- consumed all the items, return the result as is
475
476
(_, [] ) -> (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')))
477
479
consumeCompletionResponse 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
479
486
480
487
getPrefixAtPos :: LSP. LspFuncs Config -> Uri -> Position -> IO (Maybe VFS. PosPrefixInfo )
481
488
getPrefixAtPos lf uri pos = do
You can’t perform that action at this time.
0 commit comments