1
0
Fork 0
mirror of https://github.com/nix-community/nixvim.git synced 2025-12-17 14:31:11 +01:00

modules/lsp/servers: simplify displayName and packageName

Move the `let in` block defining `displayName` and `packageName` up so
it doesn't have to deal with the module arg `name` shadowing `args.name`.

This simplifies the implementation and reduces repetition.
This commit is contained in:
Matt Sturgeon 2025-12-15 10:34:08 +00:00
parent 753f7640d6
commit 12a76dd12b

View file

@ -4,6 +4,10 @@
package ? null,
config ? null,
}@args:
let
displayName = name;
packageName = package.name or args.name or "language server";
in
{
lib,
name,
@ -13,8 +17,6 @@
}:
let
inherit (lib) types;
displayName = args.name or "the language server";
packageName = package.name or (lib.strings.removePrefix "the " displayName);
in
{
options = {