refactor(nvim): improve plugin options
parent
f5ce0b73bd
commit
2e520505c7
|
@ -50,7 +50,7 @@ let
|
||||||
"dir = ${quote plugin}"
|
"dir = ${quote plugin}"
|
||||||
"name = ${quote (getName plugin)}"
|
"name = ${quote (getName plugin)}"
|
||||||
]
|
]
|
||||||
++ (optional (!lazy) "lazy = ${boolToString lazy}")
|
++ (optional (lazy != null) "lazy = ${boolToString lazy}")
|
||||||
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
++ (optional (!enabled) "enabled = ${boolToString enabled}")
|
||||||
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
|
++ (optional (dependencies != [ ]) "dependencies = ${listToStringMultiLine id (map lazySpecFromPlugin dependencies)}")
|
||||||
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
++ (optional (init != null) "init = function(plugin)\n${toString init}\nend")
|
||||||
|
@ -59,7 +59,7 @@ let
|
||||||
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
|
++ (optional (event != [ ]) "event = ${listToStringOneLine quote event}")
|
||||||
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
|
++ (optional (cmd != [ ]) "cmd = ${listToStringOneLine quote cmd}")
|
||||||
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
|
++ (optional (ft != [ ]) "ft = ${listToStringOneLine quote ft}")
|
||||||
++ (optional (priority != 50) "priority = ${toString priority}")
|
++ (optional (priority != null) "priority = ${toString priority}")
|
||||||
);
|
);
|
||||||
lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins);
|
lazySpecs = listToStringMultiLine id (map lazySpecFromPlugin cfg.plugins);
|
||||||
lazy = ''
|
lazy = ''
|
||||||
|
@ -86,7 +86,7 @@ in
|
||||||
type = nullOr str;
|
type = nullOr str;
|
||||||
default = null;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Lua code to be executed when the plugin is loaded.
|
Lua function to be executed when the plugin is loaded.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
dependencies = mkOption {
|
dependencies = mkOption {
|
||||||
|
@ -111,8 +111,8 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
lazy = mkOption {
|
lazy = mkOption {
|
||||||
type = bool;
|
type = nullOr bool;
|
||||||
default = true;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Whether to load the plugin lazily.
|
Whether to load the plugin lazily.
|
||||||
'';
|
'';
|
||||||
|
@ -145,8 +145,8 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
priority = mkOption {
|
priority = mkOption {
|
||||||
type = int;
|
type = nullOr int;
|
||||||
default = 50;
|
default = null;
|
||||||
description = ''
|
description = ''
|
||||||
Priority to load the plugin.
|
Priority to load the plugin.
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in New Issue