modules/lsp: don't enable wildcard server

The wildcard server ("*") should have its config set, but not be enabled
through `vim.lsp.enable()`.
This commit is contained in:
Johan Larsson 2025-04-30 12:19:09 +02:00 committed by Matt Sturgeon
parent 1df98b6636
commit 2d65c66a1a
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299

View file

@ -5,7 +5,12 @@
settings ? null,
pkgs ? { },
}@args:
{ lib, name, ... }:
{
lib,
name,
config,
...
}:
let
inherit (lib) types;
displayName = args.name or "the language server";
@ -31,7 +36,10 @@ in
description = ''
Whether to call `vim.lsp.enable()` for ${displayName}.
'';
default = true;
default = config.name != "*";
defaultText = lib.literalMD ''
`true`, unless the server's `name` is `*`
'';
example = false;
};