diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-08-15 15:16:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 15:16:03 +0800 |
commit | 2c798703ca854d670fb28f51adc85c2b41f08f37 (patch) | |
tree | aa192cf6d6ed02d02dda8c8b7a4c240dded64efb /script/service | |
parent | abd5daae1885cdf7a9e21a1cbdfea945385124fc (diff) | |
parent | b71cb7aecd9337c9463a4dfbdb9d06cac7b825fd (diff) | |
download | lua-language-server-2c798703ca854d670fb28f51adc85c2b41f08f37.zip |
Merge branch 'master' into cast-table-to-class
Diffstat (limited to 'script/service')
-rw-r--r-- | script/service/service.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/script/service/service.lua b/script/service/service.lua index c3afd4cf..c7675f1b 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -13,6 +13,7 @@ local time = require 'bee.time' local fw = require 'filewatch' local furi = require 'file-uri' local net = require 'service.net' +local client = require 'client' require 'jsonc' require 'json-beautify' @@ -202,6 +203,9 @@ end local showStatusTip = math.random(100) == 1 function m.reportStatus() + if not client.getOption('statusBar') then + return + end local info = {} if m.workingClock and time.monotonic() - m.workingClock > 100 then info.text = '$(loading~spin)Lua' @@ -245,6 +249,10 @@ function m.testVersion() end end +function m.sayHello() + proto.notify('$/hello', {'world'}) +end + function m.lockCache() local fs = require 'bee.filesystem' local sp = require 'bee.subprocess' @@ -280,6 +288,8 @@ function m.start() require 'provider' + m.sayHello() + m.eventLoop() end |