summaryrefslogtreecommitdiff
path: root/server/src/method/textDocument/completion.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-08-27 21:09:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-08-27 21:09:24 +0800
commit90fb20579113cd580faf030332c2007b40a6fe2e (patch)
tree34138bdf73fbf8031216861691d8a34760e6a434 /server/src/method/textDocument/completion.lua
parent972e6458ed5c256cb3d1de05b585bc3fc55f82ad (diff)
downloadlua-language-server-90fb20579113cd580faf030332c2007b40a6fe2e.zip
总是发送 insertText
Diffstat (limited to 'server/src/method/textDocument/completion.lua')
-rw-r--r--server/src/method/textDocument/completion.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/method/textDocument/completion.lua b/server/src/method/textDocument/completion.lua
index eb33b3ce..4c7581df 100644
--- a/server/src/method/textDocument/completion.lua
+++ b/server/src/method/textDocument/completion.lua
@@ -81,6 +81,7 @@ return function (lsp, params)
for i, item in ipairs(items) do
item.sortText = ('%04d'):format(i)
item.insertTextFormat = 2
+ item.insertText = item.insertText or item.label
if item.textEdit then
item.textEdit.range = posToRange(lines, item.textEdit.start, item.textEdit.finish)
item.textEdit.start = nil