summaryrefslogtreecommitdiff
path: root/script/files.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-02-24 14:51:57 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-02-24 14:51:57 +0800
commit5ba257313e9e6398e97476407aea43dd80ab996f (patch)
treed3569611d711dc726fc1c87090cf178f386fa8ae /script/files.lua
parent6a41f28c76daec6f9bc1f4505ad9e005c5412306 (diff)
downloadlua-language-server-5ba257313e9e6398e97476407aea43dd80ab996f.zip
cache globals when loading
Diffstat (limited to 'script/files.lua')
-rw-r--r--script/files.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/script/files.lua b/script/files.lua
index 6dab8a01..fb7487bf 100644
--- a/script/files.lua
+++ b/script/files.lua
@@ -266,6 +266,7 @@ end
--- 移除所有文件
function m.removeAll()
+ local ws = require 'workspace.workspace'
m.globalVersion = m.globalVersion + 1
await.close('files.version')
m._pairsCache = nil
@@ -278,6 +279,7 @@ function m.removeAll()
m.onWatch('remove', uri)
end
end
+ ws.flushCache()
--m.notifyCache = {}
end