diff options
-rw-r--r-- | changelog.md | 3 | ||||
-rw-r--r-- | script/provider/provider.lua | 17 |
2 files changed, 15 insertions, 5 deletions
diff --git a/changelog.md b/changelog.md index d7e0ee3b..3ade8c93 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,8 @@ # changelog +## 2.4.2 +* `FIX` [#709](https://github.com/sumneko/lua-language-server/issues/709) + ## 2.4.1 `2021-10-2` * `FIX` broken with single file 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 |