LunarVim/lua/lvim/core/lualine
Rafael Madriz 55f048aaae
fix(lualine): use get_active_clients instead of deprecated function (#4136)
* fix(lualine): use `get_active_clients` instead of deprecated function

`vim.lsp.get_active_clients()` accepts a table to filter returned
clients by id, bufnr and name. In this case when want to get clients for
current buffer, if bufnr is not given then it defaults to current
buffer, so need to pass anything here.

See `help vim.lsp.buf_get_clients()`

* refactor(lualine): simplify LSP component

`vim.lsp.get_active_clients` always returns a table, if that table is
empty, there's no clients attached, hence return appropriate message. No
need to use `next()`

Remove all the complicated logic with the `msg` parameter, no argument
is passed in any of the places that component is used, no need to have it.

* fix: only get clients attached to current buffer

---------

Co-authored-by: LostNeophyte <lostneophyte@tuta.io>
2023-05-07 11:47:34 +02:00
..
colors.lua feat: add an independent lvim namespace (#1699) 2021-10-10 21:07:41 +02:00
components.lua fix(lualine): use get_active_clients instead of deprecated function (#4136) 2023-05-07 11:47:34 +02:00
conditions.lua fix: use columns instead of winwidth 2022-09-21 21:21:00 -04:00
init.lua refactor(alpha): remove laststatus and tabline autocmds (#3809) 2023-02-04 16:24:56 +01:00
styles.lua refactor: more deliberate reload (#3133) 2022-10-04 13:23:52 -04:00
utils.lua feat: add alpha.nvim integration (#1906) 2022-03-19 20:02:45 +01:00