From cced91c720a2e2fdf30f8eb0f3d09ad3bdb84c8d Mon Sep 17 00:00:00 2001 From: mokchira Date: Tue, 17 Jan 2023 17:29:34 -0500 Subject: [PATCH] Added fix for snippet support. From this PR https://github.com/natebosch/vim-lsc/pull/396 --- autoload/lsc/complete.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autoload/lsc/complete.vim b/autoload/lsc/complete.vim index 3978dcb..f1d9c25 100644 --- a/autoload/lsc/complete.vim +++ b/autoload/lsc/complete.vim @@ -230,7 +230,7 @@ function! s:CompletionItemWord(lsp_item) abort \ 'snippet': l:item.word, \ 'snippet_trigger': l:item.word \ }) - let l:item.word = a:lsp_item.label + let l:item.word = substitute(a:lsp_item.label, '^\s*\|\s*$', '', 'g') endif return l:item endfunction