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:
parent
753f7640d6
commit
12a76dd12b
1 changed files with 4 additions and 2 deletions
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue