mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-14 08:36:57 +00:00
feat(rust): various cleans
This commit is contained in:
parent
ac4547b2e9
commit
c031ff9087
2 changed files with 9 additions and 7 deletions
|
|
@ -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}
|
||||
'');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue