test: fix tests

This commit is contained in:
Folke Lemaitre 2026-03-20 23:16:04 +01:00
parent 4e9eac57ab
commit 59126caa31
No known key found for this signature in database
GPG key ID: 9B52594D560070AB
2 changed files with 9 additions and 2 deletions

View file

@ -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

View file

@ -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 "