mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-10 23:13:17 +00:00
23 lines
725 B
Nix
23 lines
725 B
Nix
{lib}: let
|
|
inherit (lib.options) mkOption;
|
|
|
|
mkLspPresetEnableOption = option: display: fileTypes:
|
|
mkLspPresetEnableOptionWithDesc option display fileTypes "";
|
|
|
|
mkLspPresetEnableOptionWithDesc = option: display: fileTypes: description:
|
|
mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = lib.removeSuffix "\n" (''
|
|
The ${display} Language Server.
|
|
Default `filetypes = ${lib.generators.toPretty {} fileTypes}`.
|
|
Use {option}`vim.lsp.servers.${option}` for customization.
|
|
''
|
|
+ lib.optionalString (description != "") ''
|
|
|
|
${description}
|
|
'');
|
|
};
|
|
in {
|
|
inherit mkLspPresetEnableOption mkLspPresetEnableOptionWithDesc;
|
|
}
|