summaryrefslogtreecommitdiff
path: root/script/core/completion
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-11-06 23:17:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-11-06 23:17:19 +0800
commitfe5eb506a4aef026fd92f0ee6ce3290fdceaab61 (patch)
tree682539f6651d8ec94401e73e5502593ec5fe5049 /script/core/completion
parent9be846d86c494e08d376aa465e8269796176765a (diff)
downloadlua-language-server-fe5eb506a4aef026fd92f0ee6ce3290fdceaab61.zip
improve performance
Diffstat (limited to 'script/core/completion')
-rw-r--r--script/core/completion/completion.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua
index f2e1e7be..d75cbea0 100644
--- a/script/core/completion/completion.lua
+++ b/script/core/completion/completion.lua
@@ -21,6 +21,7 @@ local postfix = require 'core.completion.postfix'
local diag = require 'proto.diagnostic'
local wssymbol = require 'core.workspace-symbol'
local findSource = require 'core.find-source'
+local diagnostic = require 'provider.diagnostic'
local diagnosticModes = {
'disable-next-line',
@@ -2232,6 +2233,8 @@ local function completion(uri, position, triggerCharacter)
return nil
end
clearStack()
+ diagnostic.pause()
+ local _ <close> = diagnostic.resume
local results = {}
tracy.ZoneBeginN 'completion #2'
tryCompletions(state, position, triggerCharacter, results)