mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-27 11:08:53 +02:00
plugins/languages: move to by-name
This commit is contained in:
parent
9d323f3ec7
commit
b1d0959bc9
71 changed files with 19 additions and 36 deletions
44
plugins/by-name/plantuml-syntax/default.nix
Normal file
44
plugins/by-name/plantuml-syntax/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
helpers,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
{
|
||||
options.plugins.plantuml-syntax = {
|
||||
enable = mkEnableOption "plantuml syntax support";
|
||||
|
||||
package = lib.mkPackageOption pkgs "plantuml-syntax" {
|
||||
default = [
|
||||
"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;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue