diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-16 23:32:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-16 23:32:59 +0800 |
commit | 944b7d59f9dbb8f7f41083478018f3e3ae255713 (patch) | |
tree | 6245a2234956278610e42ae923660ff84bd7507c /script/vm/node.lua | |
parent | d31ecd5f2b8793667b3e8dad576737440c47a29d (diff) | |
download | lua-language-server-944b7d59f9dbb8f7f41083478018f3e3ae255713.zip |
cleanup
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index 21f95a49..6906da7e 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -2,6 +2,7 @@ local files = require 'files' local localMgr = require 'vm.local-manager' ---@class vm local vm = require 'vm.vm' +local ws = require 'workspace.workspace' ---@type table<vm.object, vm.node> vm.nodeCache = {} @@ -271,6 +272,8 @@ end files.watch(function (ev, uri) if ev == 'version' then - vm.clearNodeCache() + if ws.isReady(uri) then + vm.clearNodeCache() + end end end) |