@@ -668,7 +668,15 @@ require('lazy').setup({
668
668
-- 1) via the mason package manager; or
669
669
-- 2) via your system's package manager; or
670
670
-- 3) via a release binary from a language server's repo that's accessible somewhere on your system.
671
- --
671
+
672
+ -- The servers table comprises of the following sub-tables:
673
+ -- 1. mason
674
+ -- 2. others
675
+ -- Both these tables have an identical structure of language server names as keys and
676
+ -- a table of language server configuration as values.
677
+ --- @class LspServersConfig
678
+ --- @field mason table<string , vim.lsp.Config>
679
+ --- @field others table<string , vim.lsp.Config>
672
680
local servers = {
673
681
-- Add any additional override configuration in any of the following tables. Available keys are:
674
682
-- - cmd (table): Override the default command used to start the server
@@ -736,7 +744,7 @@ require('lazy').setup({
736
744
-- to the default language server configs as provided by nvim-lspconfig or
737
745
-- define a custom server config that's unavailable on nvim-lspconfig.
738
746
for server , config in pairs (vim .tbl_extend (' keep' , servers .mason , servers .others )) do
739
- if vim .fn . empty (config ) ~= 1 then
747
+ if not vim .tbl_isempty (config ) then
740
748
vim .lsp .config (server , config )
741
749
end
742
750
end
@@ -748,7 +756,7 @@ require('lazy').setup({
748
756
}
749
757
750
758
-- Manually run vim.lsp.enable for all language servers that are *not* installed via Mason
751
- if vim .fn . empty (servers .others ) ~= 1 then
759
+ if not vim .tbl_isempty (servers .others ) then
752
760
vim .lsp .enable (vim .tbl_keys (servers .others ))
753
761
end
754
762
end ,
0 commit comments