From 562ce056eb72ceada37ea5f950a05db8876b5eac Mon Sep 17 00:00:00 2001 From: Vladimir Popov Date: Sun, 24 Dec 2023 20:34:01 +0400 Subject: [PATCH] feat(ex.lsp.single): check registered sources to mark null-ls as active lsp client . --- .github/workflows/ci.yml | 1 - lua/lualine/components/ex/lsp/single.lua | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 402c40a..f76d3ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,7 +6,6 @@ on: - main pull_request: paths-ignore: - - '**.md' - 'LICENSE' jobs: diff --git a/lua/lualine/components/ex/lsp/single.lua b/lua/lualine/components/ex/lsp/single.lua index 0f749e5..3ad1c71 100644 --- a/lua/lualine/components/ex/lsp/single.lua +++ b/lua/lualine/components/ex/lsp/single.lua @@ -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)