summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-01-12 17:19:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-01-12 17:19:03 +0800
commitac9e09ffb7e0dddf7e48725ce59733c53a7443b3 (patch)
tree8635af9b4e8b8b770bbb565eddeb48494dfbb5f3 /script/provider
parentd066720039568bab0126bc058faf23588500562a (diff)
downloadlua-language-server-ac9e09ffb7e0dddf7e48725ce59733c53a7443b3.zip
improve completion speed
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/diagnostic.lua2
-rw-r--r--script/provider/provider.lua2
2 files changed, 2 insertions, 2 deletions
diff --git a/script/provider/diagnostic.lua b/script/provider/diagnostic.lua
index db967e81..907ed55d 100644
--- a/script/provider/diagnostic.lua
+++ b/script/provider/diagnostic.lua
@@ -352,7 +352,7 @@ function m.diagnosticsScope(uri, force)
end
await.close ('diagnosticsScope:' .. uri)
await.call(function () ---@async
- await.sleep(delay)
+ await.sleep(math.max(delay, 0.1))
local clock = os.clock()
local bar <close> = progress.create(ws.getScope(uri), lang.script.WORKSPACE_DIAGNOSTIC, 1)
local cancelled
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 5401ff47..1c84caf1 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -584,7 +584,7 @@ m.register 'textDocument/completion' {
items[i] = item
end
return {
- isIncomplete = not result.complete,
+ isIncomplete = result.incomplete,
items = items,
}
end