autoload/lsp/completion.vim | 4 ++-- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index d0d24513fb9b9b1cbe7fafc59254e9fcb2e9585e..5c5e1461557913b6d1504fadc48ab31ec8007345 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -88,7 +88,7 @@ # Get the keyword prefix before the current cursor column. var col = charcol('.') var starttext = getline('.')[ : col - 1] - var prefix = matchstr(starttext, '\k*$') + var prefix = tolower(matchstr(starttext, '\k*$')) var completeItems: list> = [] for item in items @@ -107,7 +107,7 @@ d.word = MakeValidWord(d.word) else # plain text completion. If the completion item text doesn't start with # the current (case ignored) keyword prefix, skip it. - if prefix != '' && d.word !~? $'^{prefix}' + if prefix != '' && stridx(tolower(d.word), prefix) != 0 continue endif endif