Skip to content

Commit

Permalink
fix(astrolsp): servers list should be extended by default
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Jul 8, 2024
1 parent c5265ba commit 167fd37
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions lua/astronvim/plugins/_astrolsp.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
return {
"AstroNvim/astrolsp",
lazy = true,
opts_extend = { "servers" },
opts = function(_, opts)
return require("astrocore").extend_tbl(opts, {
features = {
Expand Down
8 changes: 7 additions & 1 deletion lua/astronvim/plugins/configs/lspconfig.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
return function(_, _)
local setup_servers = function()
vim.tbl_map(require("astrolsp").lsp_setup, require("astrolsp").config.servers)
local was_setup, astrolsp = {}, require "astrolsp"
for _, server in ipairs(astrolsp.config.servers) do
if not was_setup[server] then
astrolsp.lsp_setup(server)
was_setup[server] = true
end
end
require("astrocore").exec_buffer_autocmds("FileType", { group = "lspconfig" })

require("astrocore").event "LspSetup"
Expand Down

0 comments on commit 167fd37

Please sign in to comment.