nvim-lua / lsp-status.nvim

Utility functions for getting diagnostic status and progress messages from LSP servers, for use in the Neovim statusline
MIT License
621 stars 41 forks source link

fix(get_lsp_statusline): fixed lsp status always return empty string if lsp is restarted #65

Closed tigorlazuardi closed 2 years ago

tigorlazuardi commented 2 years ago

Apparently #vim.lsp.buf_get_clients(bufnr) == 0 always returns 0 if lsp is restarted (why? I dunno. I am not an expert in lua).

Using vim.tbl_count solved this issue and if lsp is restarted, it will correctly shows again.