mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-23 17:28:39 +02:00
plantuml: init syntax plugin (#104)
This commit is contained in:
parent
2f9c21ffc8
commit
7713f5d441
2 changed files with 34 additions and 0 deletions
|
@ -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
|
||||
|
|
33
plugins/languages/plantuml-syntax.nix
Normal file
33
plugins/languages/plantuml-syntax.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue