summaryrefslogtreecommitdiff
path: root/script/workspace
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-01-13 15:33:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-01-13 15:33:57 +0800
commitc7a0b295570e78a43f0819d9e0ba9a4c076b7e1a (patch)
tree09df22bee47c4c3fd52bd1ccf86ea3f43bb10d17 /script/workspace
parent15a7b101e2556a60288bb8f9066caf132c8cce13 (diff)
downloadlua-language-server-c7a0b295570e78a43f0819d9e0ba9a4c076b7e1a.zip
pause diagnostic before preload
Diffstat (limited to 'script/workspace')
-rw-r--r--script/workspace/workspace.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/workspace/workspace.lua b/script/workspace/workspace.lua
index 0f2b3f09..ca490886 100644
--- a/script/workspace/workspace.lua
+++ b/script/workspace/workspace.lua
@@ -255,8 +255,10 @@ end
--- 预读工作区内所有文件
function m.awaitPreload()
+ local diagnostic = require 'provider.diagnostic'
await.close 'preload'
await.setID 'preload'
+ diagnostic.pause()
m.libraryMatchers = nil
m.nativeMatcher = nil
m.cache = {}
@@ -292,7 +294,6 @@ function m.awaitPreload()
log.info('Preload finish.')
- local diagnostic = require 'provider.diagnostic'
diagnostic.start()
end