diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-01-05 20:05:26 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-01-05 20:05:26 +0800 |
commit | 70e83968473caa16355a380e7a4ab438f5fdd00a (patch) | |
tree | 35630d1c82ad24841c212e4c0d3ddfc0f3b916a1 /script/service/service.lua | |
parent | b00533675b11322b79214f9e707bdc006cb43746 (diff) | |
download | lua-language-server-70e83968473caa16355a380e7a4ab438f5fdd00a.zip |
update status bar
Diffstat (limited to 'script/service/service.lua')
-rw-r--r-- | script/service/service.lua | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/script/service/service.lua b/script/service/service.lua index 087ee85e..ea6ff1e5 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -191,17 +191,19 @@ function m.reportStatus() info.text = '😺Lua' end - local roots = {} - for i, scp in ipairs(ws.folders) do - roots[i] = furi.decode(scp.uri) - end - - info.tooltip = lang.script('WINDOW_LUA_STATUS', { - ws = table.concat(roots, ';'), + local tooltips = {} + local params = { ast = files.astCount, max = files.fileCount, mem = collectgarbage('count') / 1000, - }) + } + for i, scp in ipairs(ws.folders) do + tooltips[i] = lang.script('WINDOW_LUA_STATUS_WORKSPACE', furi.decode(scp.uri)) + end + tooltips[#tooltips+1] = lang.script('WINDOW_LUA_STATUS_CACHED_FILES', params) + tooltips[#tooltips+1] = lang.script('WINDOW_LUA_STATUS_MEMORY_COUNT', params) + + info.tooltip = table.concat(tooltips, '\n') if util.equal(m.lastInfo, info) then return end |