summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/provider/provider.lua')
-rw-r--r--script/provider/provider.lua17
1 files changed, 12 insertions, 5 deletions
diff --git a/script/provider/provider.lua b/script/provider/provider.lua
index 75ed4b4f..ac16c4e3 100644
--- a/script/provider/provider.lua
+++ b/script/provider/provider.lua
@@ -867,16 +867,23 @@ do
end)
end
+local function refreshStatusBar()
+ local value = config.get 'Lua.window.statusBar'
+ if value then
+ proto.notify('$/status/show')
+ else
+ proto.notify('$/status/hide')
+ end
+end
+
config.watch(function (key, value)
if key == 'Lua.window.statusBar' then
- if value then
- proto.notify('$/status/show')
- else
- proto.notify('$/status/hide')
- end
+ refreshStatusBar()
end
end)
+proto.on('$/status/refresh', refreshStatusBar)
+
files.watch(function (ev, uri)
if not workspace.isReady() then
return