diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-13 17:22:44 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-13 17:22:44 +0800 |
commit | 55137120df7595d75a7a7a08d70a4d1549820e47 (patch) | |
tree | 85b898fc09ac55718b8a79bb9e095e9d65ad7218 /script/provider | |
parent | d94e046f62badc58eeb761e39269b0f39e08d8ae (diff) | |
download | lua-language-server-55137120df7595d75a7a7a08d70a4d1549820e47.zip |
test clear node cache
#1626
Diffstat (limited to 'script/provider')
-rw-r--r-- | script/provider/provider.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua index c93a7c53..517ef54e 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -1072,6 +1072,7 @@ m.register '$/status/click' { local result = client.awaitRequestMessage('Info', lang.script.WINDOW_LUA_STATUS_DIAGNOSIS_MSG, { titleDiagnostic, DEVELOP and 'Restart Server', + DEVELOP and 'Clear Node Cache', }) if not result then return @@ -1085,6 +1086,11 @@ m.register '$/status/click' { local diag = require 'provider.diagnostic' diag.clearAll(true) os.exit(0, true) + elseif result == 'Clear Node Cache' then + local vm = require 'vm' + vm.clearNodeCache() + collectgarbage() + collectgarbage() end end } |