summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-09 17:25:23 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-09 17:25:23 +0800
commita779b7dbbbfbd4a5a177ba44f0db131d1ce3c6a6 (patch)
treeb0ce64e12ddcbf7f564a08d162138341fe7fca86 /script/provider/provider.lua
parentd1b6b518a28170b13ba1d83bd39a3c23efac04fd (diff)
downloadlua-language-server-a779b7dbbbfbd4a5a177ba44f0db131d1ce3c6a6.zip
do full gc after scope diag
#1745
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index d7c5c655..319d00a9 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -1159,6 +1159,7 @@ m.register '$/status/click' {
titleDiagnostic,
DEVELOP and 'Restart Server' or nil,
DEVELOP and 'Clear Node Cache' or nil,
+ DEVELOP and 'GC' or nil,
})
if not result then
return
@@ -1177,6 +1178,9 @@ m.register '$/status/click' {
vm.clearNodeCache()
collectgarbage()
collectgarbage()
+ elseif result == 'GC' then
+ collectgarbage()
+ collectgarbage()
end
end
}