Skip to content
This repository has been archived by the owner on Aug 12, 2023. It is now read-only.

null-ls always takes id: 1, which means null-ls appears in the lualine active server #1406

Answered by fitrh
xeros-and-ones asked this question in Q&A
Discussion options

You must be logged in to vote

I think it's easier to tell your lualine component to return the client if its name is not null-ls.

Something like this

local lsp_server = {
  function()
    for _, client in ipairs(vim.lsp.buf_get_clients(0)) do
      if client.name ~= "null-ls" then
        return client.name
      end
    end

    return "[No LSP Attached]"
  end,
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@xeros-and-ones
Comment options

Answer selected by xeros-and-ones
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants