From: Girish Palya <girishji@gmail.com> Date: Thu, 1 Jun 2023 15:26:53 +0000 (+0200) Subject: Use string evaluation X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=022f2d519516dbe67130fde25c06f7bb57fa129d;p=vim-lsp.git Use string evaluation M autoload/lsp/completion.vim --- diff --git a/autoload/lsp/completion.vim b/autoload/lsp/completion.vim index 8b7918d..06dcf3c 100644 --- a/autoload/lsp/completion.vim +++ b/autoload/lsp/completion.vim @@ -143,7 +143,7 @@ def CompletionVsnip(items: list<dict<any>>) var chars = escape(abbr, '\/?')->split('\zs') var chars_pattern = '\%(\V' .. chars->join('\m\|\V') .. '\m\)' var separator = chars[0] =~ '\a' ? '\<' : '' - return separator .. '\V' .. chars[0] .. '\m' .. chars_pattern .. '*$' + return $'{separator}\V{chars[0]}\m{chars_pattern}*$' enddef if charcol('.') == 1