autoload/lsp/completion.vim | 12 ++++++------ diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index d68ae87d3b7a23bf620135e92e7e5f2072ea0c67..5f2869c1778095acfb5a5446f863c72f1c92301f 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -13,7 +13,7 @@ # Returns true if omni-completion is enabled for filetype 'ftype'. # Otherwise, returns false. def LspOmniComplEnabled(ftype: string): bool - return ftypeOmniCtrlMap->get(ftype, v:false) + return ftypeOmniCtrlMap->get(ftype, false) enddef # Enables or disables omni-completion for filetype 'fype' @@ -320,7 +320,7 @@ if findstart # first send all the changes in the current buffer to the LSP server listener_flush() - lspserver.omniCompletePending = v:true + lspserver.omniCompletePending = true lspserver.completeItems = [] # initiate a request to LSP server to get list of completions lspserver.getCompletion(1, '') @@ -352,18 +352,18 @@ var prefix = lspserver.omniCompleteKeyword # Don't attempt to filter on the items, when "isIncomplete" is set if prefix == '' || lspserver.completeItemsIsIncomplete - return res->empty() ? v:none : res + return res endif if opt.lspOptions.completionMatcher == 'fuzzy' - return res->empty() ? v:none : res->matchfuzzy(prefix, { key: 'word' }) + return res->matchfuzzy(prefix, { key: 'word' }) endif if opt.lspOptions.completionMatcher == 'icase' - return res->empty() ? v:none : res->filter((i, v) => v.word->tolower()->stridx(prefix) == 0) + return res->filter((i, v) => v.word->tolower()->stridx(prefix) == 0) endif - return res->empty() ? v:none : res->filter((i, v) => v.word->stridx(prefix) == 0) + return res->filter((i, v) => v.word->stridx(prefix) == 0) endif enddef