mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-22 21:30:51 +00:00
Compare commits
38 commits
ff214b7aac
...
961ebc2b08
Author | SHA1 | Date | |
---|---|---|---|
|
961ebc2b08 | ||
|
83fd1b5c7a | ||
|
e40cce5653 | ||
|
c331e3303e | ||
|
745d539732 | ||
|
4dcce23410 | ||
|
29f9e3f168 | ||
|
60b0c630a7 | ||
|
6b94991888 | ||
|
ff214eb491 | ||
|
61dc161ef7 | ||
|
c80f303b0f | ||
|
a6568e64dd | ||
|
98bfd74de3 | ||
|
7260efac66 | ||
|
be6e41e876 | ||
|
8195ad5cc9 | ||
|
ad5b928830 | ||
|
3fbef8cdb4 | ||
|
fc63d2e0a1 | ||
|
980c80f0b8 | ||
|
320d05aff2 | ||
|
1b661bacfd | ||
|
3763d71124 | ||
|
1e83f6f50b | ||
|
e07ff4029b | ||
|
dee9fa0d61 | ||
|
7aef3392fd | ||
|
4a8c83130d | ||
|
8a0ffcb69f | ||
|
8f92dd2dc1 | ||
|
0d452bcaf7 | ||
|
44681a4cb5 | ||
|
b1a1aaba46 | ||
|
b409800b2f | ||
|
ad8ce463f1 | ||
|
6d654ce4cd | ||
|
202ea7570d |
3 changed files with 36 additions and 20 deletions
|
@ -6,7 +6,7 @@
|
|||
inherit (lib.options) mkOption;
|
||||
inherit (lib.attrsets) attrNames mapAttrs' filterAttrs nameValuePair;
|
||||
inherit (lib.strings) hasPrefix removePrefix;
|
||||
inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr oneOf bool;
|
||||
inherit (lib.types) submodule either package enum str lines attrsOf anything listOf nullOr oneOf bool int;
|
||||
# Get the names of all flake inputs that start with the given prefix.
|
||||
fromInputs = {
|
||||
inputs,
|
||||
|
@ -138,6 +138,18 @@
|
|||
|
||||
# lz.n options
|
||||
|
||||
enabled = mkOption {
|
||||
type = nullOr (either bool str);
|
||||
description = "When false, or if the lua function returns false, this plugin will not be included in the spec";
|
||||
default = null;
|
||||
};
|
||||
|
||||
beforeAll = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Lua code to run before any plugins are loaded. This will be wrapped in a function.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
before = mkOption {
|
||||
type = nullOr str;
|
||||
description = "Lua code to run before plugin is loaded. This will be wrapped in a function.";
|
||||
|
@ -195,7 +207,27 @@
|
|||
'';
|
||||
};
|
||||
|
||||
# TODO: enabled, beforeAll, colorscheme, priority, load
|
||||
colorscheme = mkOption {
|
||||
description = "Lazy-load on colorscheme.";
|
||||
type = nullOr (either str (listOf str));
|
||||
default = null;
|
||||
};
|
||||
|
||||
priority = mkOption {
|
||||
type = nullOr int;
|
||||
description = "Only useful for stat plugins (not lazy-loaded) to force loading certain plugins first.";
|
||||
default = null;
|
||||
};
|
||||
|
||||
load = mkOption {
|
||||
type = str;
|
||||
default = null;
|
||||
description = ''
|
||||
Lua code to override the `vim.g.lz_n.load()` function for a single plugin.
|
||||
|
||||
This will be wrapped in a function
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
in {
|
||||
|
|
|
@ -44,23 +44,7 @@
|
|||
|
||||
# legacy stuff
|
||||
mapOption = submodule {
|
||||
options =
|
||||
mapConfigOptions
|
||||
// {
|
||||
action = mkOption {
|
||||
type = str;
|
||||
description = "The action to execute.";
|
||||
};
|
||||
|
||||
lua = mkOption {
|
||||
type = bool;
|
||||
description = ''
|
||||
If true, `action` is considered to be lua code.
|
||||
Thus, it will not be wrapped in `""`.
|
||||
'';
|
||||
default = false;
|
||||
};
|
||||
};
|
||||
options = mapConfigOptions;
|
||||
};
|
||||
|
||||
mapOptions = mode:
|
||||
|
|
|
@ -37,7 +37,7 @@ in {
|
|||
else keymap.action;
|
||||
|
||||
getOpts = keymap: {
|
||||
inherit (keymap) silent nowait script expr unique noremap;
|
||||
inherit (keymap) desc silent nowait script expr unique noremap;
|
||||
};
|
||||
|
||||
toLuaKeymap = {
|
||||
|
|
Loading…
Reference in a new issue