arkav / lualine-lsp-progress

LSP Progress lualine componenet
MIT License
227 stars 18 forks source link

Option to configure spinner and lsp_client_name to not be hidden #10

Open snaggen opened 2 years ago

snaggen commented 2 years ago

When I use lualine with lsp setup and this extension I get a pretty nice experience, what I miss is an indication if a lsp is active at all. So I think just having an option to not hide the spinner and lsp_client_name would solve this. This would change the semantic of the spinner a little bit to just be an lsp indicator when idle, to indicate a lsp is present and connected with a new icon, then the current spinner when showing progress.

aktau commented 2 years ago

I was looking for such an option too. Thanks for filing a FR before I could :).

syphar commented 2 years ago

I'm not sure if this really fits into this component, since it's only for the status progress.

You can easily add this yourself as a custom component in lualine:

local function lsp_client_names()
    local client_names = {}
    for _, client in ipairs(vim.lsp.get_active_clients()) do
        table.insert(client_names, client.name)
    end
    return table.concat(client_names, ",")
end

require("lualine").setup({
    sections = {
        lualine_a = {
            lsp_client_names
        }
    }
}
bercly0b commented 2 years ago

Hi guys. I have made PR with this option. But since 4 months have passed since the last commit to the repository, I dont know will this request be accepted..