The specifications states:
> for speed clients should be able to filter an already received
> completion list if the user continues typing. Servers can opt out of
> this using a CompletionList and mark it as isIncomplete
return
endif
+ lspserver.completeItemsIsIncomplete = false
+
var items: list<dict<any>>
if cItems->type() == v:t_list
items = cItems
else
items = cItems.items
+ lspserver.completeItemsIsIncomplete = cItems.isIncomplete
endif
# Get the keyword prefix before the current cursor column.
endwhile
var res: list<dict<any>> = lspserver.completeItems
+
+ # Don't attempt to filter on the items, when "isIncomplete" is set
+ if lspserver.completeItemsIsIncomplete
+ return res->empty() ? v:none : res
+ endif
+
return res->empty() ? v:none : res->filter((i, v) => v.word =~# '^' .. lspserver.omniCompleteKeyword)
endif
enddef