diff --git a/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua b/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua index 4bd3a00d..a516fc89 100644 --- a/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua +++ b/lua/lazyvim/plugins/extras/lang/typescript/oxc.lua @@ -44,7 +44,6 @@ return { { "stevearc/conform.nvim", optional = true, - ---@param opts conform.setupOpts opts = function(_, opts) opts.formatters_by_ft = opts.formatters_by_ft or {} for _, ft in ipairs(supported) do diff --git a/tests/extras/extra_spec.lua b/tests/extras/extra_spec.lua index 14f8d741..a1086590 100644 --- a/tests/extras/extra_spec.lua +++ b/tests/extras/extra_spec.lua @@ -5,6 +5,9 @@ local Icons = require("mini.icons") local Plugin = require("lazy.core.plugin") _G.LazyVim = require("lazyvim.util") +require("lazyvim.config") +LazyVim.config.get_defaults() +LazyVim.plugin.setup() describe("Extra", function() local Config = require("lazy.core.config") @@ -93,8 +96,13 @@ describe("Extra", function() local mason = spec.plugins["mason.nvim"] local mason_opts = Plugin.values(mason, "opts", false) - for lsp in pairs(lspconfig_opts.servers or {}) do + for lsp, lsp_opts in pairs(lspconfig_opts.servers or {}) do local lsp_pkg = lsp_to_pkg[lsp] + -- Skip if the LSP server is disabled in the config since mason.nvim won't install it + -- and it might still be used for conform.nvim or nvim-lint, etc. + if type(lsp_opts) == "table" and lsp_opts.enabled == false then + lsp_pkg = false + end assert( not (lsp_pkg and vim.tbl_contains(mason_opts.ensure_installed, lsp_pkg)), "LSP server "