nix-community.nixvim/plugins/languages/plantuml-syntax.nix

41 lines
917 B
Nix
Raw Normal View History

2023-01-06 16:14:30 +01:00
{
pkgs,
lib,
config,
...
}:
with lib; {
options.plugins.plantuml-syntax = {
enable = mkEnableOption "Enable plantuml syntax support";
2023-01-17 21:45:40 +01:00
package = mkOption {
type = types.package;
default = pkgs.vimPlugins.plantuml-syntax;
description = "Plugin to use for plantuml-syntax";
};
2023-01-06 16:14:30 +01:00
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 {
2023-01-17 21:45:40 +01:00
extraPlugins = [ cfg.package ];
2023-01-06 16:14:30 +01:00
globals = {
plantuml_set_makeprg = cfg.setMakeprg;
plantuml_executable_script = cfg.executableScript;
};
};
}