]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Don't filter completion items if the server reports them as being incomplete
authorAndreas Louv <andreas@louv.dk>
Sun, 19 Mar 2023 16:19:58 +0000 (17:19 +0100)
committerAndreas Louv <andreas@louv.dk>
Sun, 19 Mar 2023 18:12:02 +0000 (19:12 +0100)
autoload/lsp/completion.vim

index 5932990412450cfcc246da3c98897e920e0660e3..04e92fa970c95501a170d9ef4b8961154a0ce892 100644 (file)
@@ -125,9 +125,10 @@ export def CompletionReply(lspserver: dict<any>, cItems: any)
       # snippet completion.  Needs a snippet plugin to expand the snippet.
       # Remove all the snippet placeholders
       d.word = MakeValidWord(d.word)
-    else
+    elseif !lspserver.completeItemsIsIncomplete
       # plain text completion.  If the completion item text doesn't start with
       # the current (case ignored) keyword prefix, skip it.
+      # Don't attempt to filter on the items, when "isIncomplete" is set
       if prefix != '' && d.word->tolower()->stridx(prefix) != 0
        continue
       endif