This commit is contained in:
hrsh7th
2021-08-24 13:23:27 +09:00
parent ed4f2fc4a6
commit 7873adf9a8
2 changed files with 17 additions and 4 deletions

View File

@@ -109,11 +109,10 @@ entry.get_word = function(self)
end
elseif misc.safe(self.completion_item.insertText) then
word = str.trim(self.completion_item.insertText)
if self.completion_item.insertTextFormat == types.lsp.InsertTextFormat.Snippet then
word = str.get_word(word)
end
word = str.get_word(word)
else
word = str.trim(self.completion_item.label)
word = str.get_word(word, '')
end
return word
end)