plantuml: init syntax plugin (#104)

This commit is contained in:
traxys 2023-01-06 16:14:30 +01:00 committed by GitHub
parent 2f9c21ffc8
commit 7713f5d441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View file

@ -23,6 +23,7 @@
./languages/ledger.nix
./languages/nix.nix
./languages/plantuml-syntax.nix
./languages/treesitter.nix
./languages/treesitter-context.nix
./languages/treesitter-refactor.nix

View file

@ -0,0 +1,33 @@
{
pkgs,
lib,
config,
...
}:
with lib; {
options.plugins.plantuml-syntax = {
enable = mkEnableOption "Enable plantuml syntax support";
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 = with pkgs.vimPlugins; [plantuml-syntax];
globals = {
plantuml_set_makeprg = cfg.setMakeprg;
plantuml_executable_script = cfg.executableScript;
};
};
}