summaryrefslogtreecommitdiff
path: root/script/provider
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-30 22:02:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-30 22:02:51 +0800
commitf5116cd44bec44e765a02b61bce478071fa048a7 (patch)
treea3331f7120105a8df25f3804dcffa15c91689441 /script/provider
parent618333cc27b1ec825400090778bdd1a03d3cf3dd (diff)
downloadlua-language-server-f5116cd44bec44e765a02b61bce478071fa048a7.zip
update
Diffstat (limited to 'script/provider')
-rw-r--r--script/provider/provider.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 7357240a..baf7e705 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -1019,9 +1019,15 @@ do
end)
end
-local function refreshStatusBar(uri)
- local value = config.get(uri, 'Lua.window.statusBar')
- if value then
+local function refreshStatusBar()
+ local valid = true
+ for _, scp in ipairs(workspace.folders) do
+ if not config.get(scp.uri, 'Lua.window.statusBar') then
+ valid = false
+ break
+ end
+ end
+ if valid then
proto.notify('$/status/show')
else
proto.notify('$/status/hide')
@@ -1030,7 +1036,7 @@ end
config.watch(function (uri, key, value)
if key == 'Lua.window.statusBar' then
- refreshStatusBar(uri)
+ refreshStatusBar()
end
end)