summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-14 16:37:33 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-14 16:37:33 +0800
commitc096292fae3418ed314f0890d1519214c5df0793 (patch)
treee677068206677ca470b457d59798eb552e51d75b /script
parent21415e0ae416c8814b125fb3e2c74a293290693a (diff)
downloadlua-language-server-c096292fae3418ed314f0890d1519214c5df0793.zip
fix completion require path
Diffstat (limited to 'script')
-rw-r--r--script/core/completion.lua10
1 files changed, 6 insertions, 4 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index 436a1689..5db4aa1b 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -806,8 +806,9 @@ local function checkUri(ast, text, offset, results)
if not collect[info.expect] then
collect[info.expect] = {
textEdit = {
- start = source.start + #source[2],
- finish = source.finish - #source[2],
+ start = source.start + #source[2],
+ finish = source.finish - #source[2],
+ newText = info.expect,
}
}
end
@@ -835,8 +836,9 @@ local function checkUri(ast, text, offset, results)
if not collect[path] then
collect[path] = {
textEdit = {
- start = source.start + #source[2],
- finish = source.finish - #source[2],
+ start = source.start + #source[2],
+ finish = source.finish - #source[2],
+ newText = path,
}
}
end