robin/lylla.nvim
a tiny, customizable statusline for neovim
git clone https://git.robinwobin.dev/robin/lylla.nvim
9e7b3d4
main
1local components ={} 2 3---@param props { buffer?: integer, limit?: integer, sep?: string, filter?: fun(client: vim.lsp.Client): boolean } 4---@return string? 5function components . lsp_clients ( props ) 6props =props or {} 7local buffer =props . buffer or 0 8 9local clients =vim 10. iter ( vim . lsp . get_clients ( { bufnr =buffer } )) 11: map ( function ( 12client --[[@as vim.lsp.Client]] 13) 14if props . filter and not props . filter ( client ) then 15return 16end 17return client . config . name 18end ) 19: totable () 20 21if # clients == 0 then 22return 23end 24 25return table . concat ( clients , props . sep or " + " , 1 , vim . F . if_nil ( props . limit )) 26end 27 28return components