diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-12-14 16:37:33 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-12-14 16:37:33 +0800 |
commit | c096292fae3418ed314f0890d1519214c5df0793 (patch) | |
tree | e677068206677ca470b457d59798eb552e51d75b /script | |
parent | 21415e0ae416c8814b125fb3e2c74a293290693a (diff) | |
download | lua-language-server-c096292fae3418ed314f0890d1519214c5df0793.zip |
fix completion require path
Diffstat (limited to 'script')
-rw-r--r-- | script/core/completion.lua | 10 |
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 |