From 011f95c71a96ddb2c15a75b95d42c0fddf6f37cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 6 Aug 2024 20:21:46 +0800 Subject: =?UTF-8?q?=E9=9C=80=E8=A6=81=20statusBar=20=E9=80=89=E9=A1=B9?= =?UTF-8?q?=E6=89=8D=E4=BC=9A=E6=98=BE=E7=A4=BA=E7=8A=B6=E6=80=81=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script/service/service.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'script/service') diff --git a/script/service/service.lua b/script/service/service.lua index c3afd4cf..a9a02316 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' -- cgit v1.2.3 From 40fd1d7c4c9bed4842acfdfe4e1cbb0307bab941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 7 Aug 2024 17:13:42 +0800 Subject: say hello at first to make everyone happy --- script/service/service.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script/service') diff --git a/script/service/service.lua b/script/service/service.lua index a9a02316..3fad865a 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -249,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' @@ -284,6 +288,8 @@ function m.start() require 'provider' + m.sayHello() + m.eventLoop() end -- cgit v1.2.3 From d6d3d4b96b249310552ef6081dc35a401a219239 Mon Sep 17 00:00:00 2001 From: OmentaElvis Date: Thu, 15 Aug 2024 01:51:49 +0300 Subject: FIX: Changed hello param to valid JSONRPC The previous hello jsonrpc message caused sadness since it caused lsp clients to exit as it was not a correct way to say hello. --- script/service/service.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'script/service') diff --git a/script/service/service.lua b/script/service/service.lua index 3fad865a..c7675f1b 100644 --- a/script/service/service.lua +++ b/script/service/service.lua @@ -250,7 +250,7 @@ function m.testVersion() end function m.sayHello() - proto.notify('$/hello', 'world') + proto.notify('$/hello', {'world'}) end function m.lockCache() -- cgit v1.2.3