diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 4ea35777..aa93db1e 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -147,6 +147,7 @@ enddef # process the 'textDocument/completion' reply from the LSP server # Result: CompletionItem[] | CompletionList | null export def CompletionReply(lspserver: dict, cItems: any) + lspserver.completeItemsIsIncomplete = false if cItems->empty() if lspserver.omniCompletePending lspserver.completeItems = [] @@ -155,8 +156,6 @@ export def CompletionReply(lspserver: dict, cItems: any) return endif - lspserver.completeItemsIsIncomplete = false - var items: list> if cItems->type() == v:t_list items = cItems @@ -469,6 +468,7 @@ enddef # omni complete handler def g:LspOmniFunc(findstart: number, base: string): any + var lspserver: dict = buf.CurbufGetServerChecked('completion') if lspserver->empty() return -2