summaryrefslogtreecommitdiff
path: root/script/vm
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/vm
parent6a41f28c76daec6f9bc1f4505ad9e005c5412306 (diff)
downloadlua-language-server-5ba257313e9e6398e97476407aea43dd80ab996f.zip
cache globals when loading
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/getGlobals.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/vm/getGlobals.lua b/script/vm/getGlobals.lua
index 0c502ecd..75512a75 100644
--- a/script/vm/getGlobals.lua
+++ b/script/vm/getGlobals.lua
@@ -264,5 +264,8 @@ files.watch(function (ev, uri)
end
end
needUpdateGlobals[uri] = true
+ elseif ev == 'create' then
+ getGlobalsOfFile(uri)
+ getGlobalSetsOfFile(uri)
end
end)