Skip to content

Commit

Permalink
feat(ex.lsp.single): check registered sources to mark null-ls as acti…
Browse files Browse the repository at this point in the history
…ve lsp client

.
  • Loading branch information
vladimir-popov committed Dec 29, 2023
1 parent 44b0181 commit 8de69fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:
- main
pull_request:
paths-ignore:
- '**.md'
- 'LICENSE'

jobs:
Expand Down
3 changes: 3 additions & 0 deletions lua/lualine/components/ex/lsp/single.lua
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ local function is_lsp_client_active(client)
if not client then
return false
end
if client.name == 'null-ls' then
return require('null-ls').is_registered({ filetype = vim.bo.filetype })
end
local buffers = vim.lsp.get_buffers_by_client_id(client.id) or {}
local is_active = vim.tbl_contains(buffers, vim.fn.bufnr('%'))
return is_active and is_lsp_client_ready(client)
Expand Down

0 comments on commit 8de69fd

Please sign in to comment.