summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-04-30 17:55:10 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-04-30 17:55:10 +0800
commite30e02d51f80b0d48e85fcc110d907ae4a6cbccd (patch)
treed46ba7fe3091e3d83b4e7a588820ced3ee8a619d /script
parent908feedce35b056c38fab57fd4e32727b117479c (diff)
downloadlua-language-server-e30e02d51f80b0d48e85fcc110d907ae4a6cbccd.zip
fix completion: details may be suspended
Diffstat (limited to 'script')
-rw-r--r--script/core/completion.lua4
-rw-r--r--script/provider/provider.lua2
2 files changed, 3 insertions, 3 deletions
diff --git a/script/core/completion.lua b/script/core/completion.lua
index 6ee4d61d..98a9250f 100644
--- a/script/core/completion.lua
+++ b/script/core/completion.lua
@@ -48,9 +48,7 @@ local function resolveStack(id)
return nil
end
- -- 当进行新的 resolve 时,放弃当前的 resolve
- await.close('completion.resolve')
- return await.await(callback, 'completion.resolve')
+ return callback()
end
local function trim(str)
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 65993940..a6f4d9cc 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -550,6 +550,8 @@ proto.on('completionItem/resolve', function (item)
if not item.data then
return item
end
+ await.close 'completion.resolve'
+ await.setID 'completion.resolve'
local id = item.data.id
local uri = item.data.uri
--await.setPriority(1000)