Skip to content

Commit 745ba61

Browse files
fix(get_lsp_statusline): fixed lsp status always return empty string (thus empty status line) if lsp is restarted (#65)
1 parent 54c3952 commit 745ba61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/lsp-status/statusline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ end
7676

7777
local function get_lsp_statusline(bufnr)
7878
bufnr = bufnr or 0
79-
if #vim.lsp.buf_get_clients(bufnr) == 0 then return '' end
79+
if vim.tbl_count(vim.lsp.buf_get_clients(bufnr)) == 0 then return '' end
8080
local buf_diagnostics = config.diagnostics and diagnostics(bufnr) or nil
8181
local only_hint = true
8282
local some_diagnostics = false

0 commit comments

Comments
 (0)