feat(rust): various cleans

This commit is contained in:
Samuel Cobb 2026-06-10 22:45:19 +01:00
commit c031ff9087
2 changed files with 9 additions and 7 deletions

View file

@ -1,19 +1,22 @@
{lib}: let
inherit (lib.generators) toPretty;
inherit (lib.options) mkOption;
inherit (lib.strings) removeSuffix optionalString;
inherit (lib.types) bool;
mkLspPresetEnableOption = option: display: fileTypes:
mkLspPresetEnableOptionWithDesc option display fileTypes "";
mkLspPresetEnableOptionWithDesc = option: display: fileTypes: description:
mkOption {
type = lib.types.bool;
type = bool;
default = false;
description = lib.removeSuffix "\n" (''
description = removeSuffix "\n" (''
The ${display} Language Server.
Default `filetypes = ${lib.generators.toPretty {} fileTypes}`.
Default `filetypes = ${toPretty {} fileTypes}`.
Use {option}`vim.lsp.servers.${option}` for customization.
''
+ lib.optionalString (description != "") ''
+ optionalString (description != "") ''
${description}
'');