LunarVim/lua/lvim
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
..
config refactor(lsp)!: deprecate lvim.lsp.diagnostics (#3916) 2023-05-02 09:56:47 +02:00
core fix(lualine): use get_active_clients instead of deprecated function (#4136) 2023-05-07 11:47:34 +02:00
interface chore: fix typos (#2292) 2022-02-18 17:47:17 +03:30
lsp feat: rounded border for hover and signatureHelp (#4131) 2023-05-06 16:34:04 -04:00
utils feat: regenerate lsp templates after LvimUpdate (#3864) 2023-03-06 05:15:08 -05:00
bootstrap.lua refactor: migrate to lazy.nvim (#3647) 2023-01-10 21:18:17 +01:00
icons.lua fix: replace obsolete icons (#4111) 2023-05-06 17:47:03 +02:00
keymappings.lua feat(keybindings): operator pending mode (#3626) 2022-12-21 09:23:07 +01:00
plugin-loader.lua fix: correct runtimepath order (#4124) 2023-05-07 04:36:42 -04:00
plugins.lua fix(dap): ui opens when debugging (#4116) 2023-05-02 16:46:00 -04:00
utils.lua refactor: migrate to lazy.nvim (#3647) 2023-01-10 21:18:17 +01:00