summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-12 14:21:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-12 14:21:37 +0800
commit4f11f1b3a291dbbe3e8185b49aa1346f7977ecb5 (patch)
tree7283ec45de26c290a9a0f8721200ec403f490982 /server
parent2048a535657992ff5573c692541cf10b9146f3bd (diff)
downloadlua-language-server-4f11f1b3a291dbbe3e8185b49aa1346f7977ecb5.zip
坑爹
Diffstat (limited to 'server')
-rw-r--r--server/src/core/completion.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/src/core/completion.lua b/server/src/core/completion.lua
index eab35ea0..5ceb916c 100644
--- a/server/src/core/completion.lua
+++ b/server/src/core/completion.lua
@@ -344,9 +344,11 @@ local function searchInRequire(vm, select, source, callback)
for _, str in ipairs(list) do
callback(str, nil, CompletionItemKind.File, {
textEdit = {
- start = source.start,
- finish = source.finish,
- newText = ('%q'):format(str),
+ -- TODO 坑爹自动完成的字符串里面不能包含符号
+ -- 这里长字符串会出问题,不过暂时先这样吧
+ start = source.start + 1,
+ finish = source.finish - 1,
+ newText = str,
}
})
end