summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/duplicate-doc-alias.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-30 01:33:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-30 01:33:39 +0800
commit457990e081a84b0aec2448ad23a00f5b95f1e457 (patch)
tree128ac285c1f1d41304e9ee282da59eb3b5fd3609 /script/core/diagnostics/duplicate-doc-alias.lua
parentb09404bb037f50e5fdba9eecfe0e55c9e12faa6f (diff)
downloadlua-language-server-457990e081a84b0aec2448ad23a00f5b95f1e457.zip
add many delays in diagnostics
Diffstat (limited to 'script/core/diagnostics/duplicate-doc-alias.lua')
-rw-r--r--script/core/diagnostics/duplicate-doc-alias.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/diagnostics/duplicate-doc-alias.lua b/script/core/diagnostics/duplicate-doc-alias.lua
index 5fd12847..2625f88f 100644
--- a/script/core/diagnostics/duplicate-doc-alias.lua
+++ b/script/core/diagnostics/duplicate-doc-alias.lua
@@ -2,7 +2,9 @@ local files = require 'files'
local lang = require 'language'
local vm = require 'vm'
local guide = require 'parser.guide'
+local await = require 'await'
+---@async
return function (uri, callback)
local state = files.getState(uri)
if not state then
@@ -20,6 +22,7 @@ return function (uri, callback)
if not name then
return
end
+ await.delay()
if not cache[name] then
local docs = vm.getDocSets(uri, name)
cache[name] = {}