From 99bdfeabcbe7f27d021282fdc8aedbf4340ab340 Mon Sep 17 00:00:00 2001 From: hrsh7th Date: Tue, 9 Feb 2021 21:03:18 +0900 Subject: [PATCH] Add trimming whitespace if snippet enabled --- 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 0caa0d37..cffd807e 100644 --- a/autoload/lsc/complete.vim +++ b/autoload/lsc/complete.vim @@ -233,7 +233,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