Skip to content

Commit 011f95c

Browse files
committed
需要 statusBar 选项才会显示状态栏
1 parent 16a7c65 commit 011f95c

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

script/provider/provider.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1599,6 +1599,9 @@ m.register '$/psi/select' {
15991599

16001600

16011601
local function refreshStatusBar()
1602+
if not client.getOption('statusBar') then
1603+
return
1604+
end
16021605
local valid = config.get(nil, 'Lua.window.statusBar')
16031606
for _, scp in ipairs(workspace.folders) do
16041607
if not config.get(scp.uri, 'Lua.window.statusBar') then

script/service/service.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ local time = require 'bee.time'
1313
local fw = require 'filewatch'
1414
local furi = require 'file-uri'
1515
local net = require 'service.net'
16+
local client = require 'client'
1617

1718
require 'jsonc'
1819
require 'json-beautify'
@@ -202,6 +203,9 @@ end
202203
local showStatusTip = math.random(100) == 1
203204

204205
function m.reportStatus()
206+
if not client.getOption('statusBar') then
207+
return
208+
end
205209
local info = {}
206210
if m.workingClock and time.monotonic() - m.workingClock > 100 then
207211
info.text = '$(loading~spin)Lua'

0 commit comments

Comments
 (0)