@@ -669,7 +669,15 @@ require('lazy').setup({
669669 -- 1) via the mason package manager; or
670670 -- 2) via your system's package manager; or
671671 -- 3) via a release binary from a language server's repo that's accessible somewhere on your system.
672- --
672+
673+ -- The servers table comprises of the following sub-tables:
674+ -- 1. mason
675+ -- 2. others
676+ -- Both these tables have an identical structure of language server names as keys and
677+ -- a table of language server configuration as values.
678+ --- @class LspServersConfig
679+ --- @field mason table<string , vim.lsp.Config>
680+ --- @field others table<string , vim.lsp.Config>
673681 local servers = {
674682 -- Add any additional override configuration in any of the following tables. Available keys are:
675683 -- - cmd (table): Override the default command used to start the server
@@ -759,7 +767,7 @@ require('lazy').setup({
759767 -- to the default language server configs as provided by nvim-lspconfig or
760768 -- define a custom server config that's unavailable on nvim-lspconfig.
761769 for server , config in pairs (vim .tbl_extend (' keep' , servers .mason , servers .others )) do
762- if vim .fn . empty (config ) ~= 1 then
770+ if not vim .tbl_isempty (config ) then
763771 vim .lsp .config (server , config )
764772 end
765773 end
@@ -771,7 +779,7 @@ require('lazy').setup({
771779 }
772780
773781 -- Manually run vim.lsp.enable for all language servers that are *not* installed via Mason
774- if vim .fn . empty (servers .others ) ~= 1 then
782+ if not vim .tbl_isempty (servers .others ) then
775783 vim .lsp .enable (vim .tbl_keys (servers .others ))
776784 end
777785 end ,
0 commit comments