Skip to content
This repository was archived by the owner on Oct 13, 2021. It is now read-only.

Commit 287e3b0

Browse files
committed
fix: using the default parse snippets
1 parent 7138fd9 commit 287e3b0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lua/source/lsp.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ local function get_completion_word(item, prefix)
2121
return item.textEdit.newText
2222
end
2323
elseif item.insertText ~= nil and item.insertText ~= vim.NIL then
24-
return item.insertText
24+
if protocol.InsertTextFormat[item.insertTextFormat] == "PlainText" then
25+
return item.insertText
26+
else
27+
return vim.lsp.util.parse_snippet(item.insertText)
28+
end
2529
end
2630
return item.label
2731
end

0 commit comments

Comments
 (0)