Skip to content

Commit

Permalink
feat(nvim-lspconfig): add lazy loading on nvim-lspconfig commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mehalter committed Apr 1, 2024
1 parent f1cfd02 commit 495a17a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lua/astronvim/plugins/lsp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ return {
},
},
cmd = function(_, cmds) -- HACK: lazy load lspconfig on `:Neoconf` if neoconf is available
if require("lazy.core.config").spec.plugins["neoconf.nvim"] then table.insert(cmds, "Neoconf") end
if require("astrocore").is_available "neoconf.nvim" then table.insert(cmds, "Neoconf") end
vim.list_extend(cmds, { "LspInfo", "LspLog", "LspStart" }) -- add normal `nvim-lspconfig` commands
end,
event = "User AstroFile",
config = function(...) require "astronvim.plugins.configs.lspconfig"(...) end,
Expand Down

0 comments on commit 495a17a

Please sign in to comment.