mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-21 00:25:42 +02:00
38 lines
888 B
Nix
38 lines
888 B
Nix
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
with lib; let
|
|
helpers = import ../helpers.nix {inherit lib;};
|
|
in {
|
|
options.plugins.plantuml-syntax = {
|
|
enable = mkEnableOption "plantuml syntax support";
|
|
|
|
package = helpers.mkPackageOption "plantuml-syntax" pkgs.vimPlugins.plantuml-syntax;
|
|
|
|
setMakeprg = mkOption {
|
|
type = types.bool;
|
|
default = true;
|
|
description = "Set the makeprg to 'plantuml'";
|
|
};
|
|
executableScript = mkOption {
|
|
type = types.nullOr types.str;
|
|
default = null;
|
|
description = "Set the script to be called with makeprg, default to 'plantuml' in PATH";
|
|
};
|
|
};
|
|
|
|
config = let
|
|
cfg = config.plugins.plantuml-syntax;
|
|
in
|
|
mkIf cfg.enable {
|
|
extraPlugins = [cfg.package];
|
|
|
|
globals = {
|
|
plantuml_set_makeprg = cfg.setMakeprg;
|
|
plantuml_executable_script = cfg.executableScript;
|
|
};
|
|
};
|
|
}
|