summaryrefslogtreecommitdiff
path: root/script/provider/provider.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-08 17:39:05 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-08 17:39:05 +0800
commit8bb6567f40799f555a157d5fb9307b8c686a17df (patch)
treeda9f3011e442928fecb871d92bd00eaebdd3e605 /script/provider/provider.lua
parent85f19e8e8b5b24c226f8c9b6545f73dcbc40c17a (diff)
downloadlua-language-server-8bb6567f40799f555a157d5fb9307b8c686a17df.zip
fix #709
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