1
0
Fork 0
mirror of https://github.com/pnx/lualine-lsp-status synced 2026-06-16 01:54:57 +02:00
No description
Find a file
2024-09-06 17:19:51 +02:00
lua/lualine/components add support for "always" value for show_count 2024-09-06 17:19:51 +02:00
.luarc.json adding luarc 2024-09-06 14:21:33 +02:00
README.md add support for "always" value for show_count 2024-09-06 17:19:51 +02:00

lualine-lsp-status

Plugin for showing connected lsp servers in lualine.

Screenshots

image

image image

Install

lazy.nvim

{ 'pnx/lualine-lsp-status' }

vim-plug

Plug 'pnx/lualine-lsp-status'

packer.nvim

use 'pnx/lualine-lsp-status'

Usage

Just add lsp-status as a component.

require'lualine'.setup{
    ...
    sections = {
        lualine_c = {
            ...,
            'lsp-status'
        }
    }
}

Configuration

This is the default configuration, feel free to change it to your liking.

{
    -- Control how/when client count should be displayed
    --
    -- The following values are accepted:
    --
    --  * true : Count is displayed if its greater than zero
    --  * false : No count is displayed.
    --  * "always" : Count is displayed regardless of value.
    show_count = true,

    -- true if icon should also be color coded.
    colored = true,

    -- List of filetypes to disable this component for.
    disabled_filetypes = {},

    -- Colors used.
    colors = {
        -- Color used if there are one or more clients connected
        active = {
            fg = utils.extract_color_from_hllist(
                'fg',
                { 'DiagnosticOk', 'DiagnosticSignOk' },
                '#89dceb'
            )
        },
        -- Color used if there is zero clients connected
        inactive = {
            fg = utils.extract_color_from_hllist(
                'fg',
                { 'DiagnosticError', 'DiagnosticSignError', 'Error' },
                '#f38ba8'
            )
        },
        -- Color used for the count.
        count = {
            fg = utils.extract_color_from_hllist(
                'fg',
                { 'StatusLineNormal' },
                '#ffffff'
            )
        },
    },

    -- Icon used.
    icons = {
        -- Icon used when there is one or more clients connected
        active = "",

        -- Icon used when there is zero clients connected.
        inactive = ""
    }
}