Compare commits

...

2 commits

Author SHA1 Message Date
Ching Pei Yang
0481f5f694 flake: update lzn-auto-require 2024-08-17 15:43:03 +02:00
Ching Pei Yang
83fd1b5c7a lz.n: add missing PluginSpec options 2024-08-17 13:19:12 +02:00
2 changed files with 37 additions and 5 deletions

View file

@ -862,11 +862,11 @@
"plugin-lzn-auto-require": {
"flake": false,
"locked": {
"lastModified": 1722727896,
"narHash": "sha256-h7Dx3zBkUYamQY6lcuQrwAMgBpPqskLnA6WsbefHzMU=",
"lastModified": 1723902012,
"narHash": "sha256-r1uzO5sTa3l/2dLPEfr9QAzSB+UmPRFZdn5X1D02+nk=",
"owner": "horriblename",
"repo": "lzn-auto-require",
"rev": "c6b47e148a1ff9709e802f68c2c8b558a9a8de9b",
"rev": "e52b96c3ccdada90f0b64cec46731d0fa365b465",
"type": "github"
},
"original": {

View file

@ -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 {