From d1c410b3ff32b47d2dfe2ce4e456e50942109a93 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 21 Oct 2024 18:07:30 +0200 Subject: [PATCH 1/3] flake: update lz.n --- flake.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/flake.lock b/flake.lock index 59e8e02a..5b643b08 100644 --- a/flake.lock +++ b/flake.lock @@ -879,11 +879,11 @@ "plugin-lz-n": { "flake": false, "locked": { - "lastModified": 1727574854, - "narHash": "sha256-qDWNleR2NHFkiEKE/+LNVOBRwEeskMC4dWTl5BTyZuE=", + "lastModified": 1729525284, + "narHash": "sha256-fk+ejqcqqOQz3q4D3VB2Q+U/6wCpCDk1tiDMp2YrPNE=", "owner": "nvim-neorocks", "repo": "lz.n", - "rev": "470173e3cbef763c6d1b918f3f129b67db75e1f8", + "rev": "ffd9991400ba7137f4fa8560ff50bccd7f8fb3ee", "type": "github" }, "original": { From 132d83e5880a6714f85be3433f29efa96db5c3d1 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 21 Oct 2024 18:08:09 +0200 Subject: [PATCH 2/3] lazy: update lz.n plugin spec --- modules/wrapper/lazy/lazy.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index 622d07f8..6f254fc2 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -160,6 +160,8 @@ default = null; }; + lazy = mkBool false "Lazy-load manually, e.g. using `trigger_load`."; + priority = mkOption { type = nullOr int; description = "Only useful for stat plugins (not lazy-loaded) to force loading certain plugins first."; From 7e108703633c4d15fa36ab8ff818fb8e860bd1d0 Mon Sep 17 00:00:00 2001 From: Ching Pei Yang Date: Mon, 21 Oct 2024 18:08:31 +0200 Subject: [PATCH 3/3] lazy: allow lines in place of str for lua code --- modules/wrapper/lazy/lazy.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index 6f254fc2..52ed9c3f 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -1,6 +1,6 @@ {lib, ...}: let inherit (lib.options) mkOption mkEnableOption; - inherit (lib.types) enum listOf submodule nullOr str bool int attrsOf anything either oneOf; + inherit (lib.types) enum listOf submodule nullOr str bool int attrsOf anything either oneOf lines; inherit (lib.nvim.types) pluginType; inherit (lib.nvim.config) mkBool; @@ -76,19 +76,19 @@ }; beforeAll = mkOption { - type = nullOr str; + type = nullOr lines; description = "Lua code to run before any plugins are loaded. This will be wrapped in a function."; default = null; }; before = mkOption { - type = nullOr str; + type = nullOr lines; description = "Lua code to run before plugin is loaded. This will be wrapped in a function."; default = null; }; after = mkOption { - type = nullOr str; + type = nullOr lines; description = '' Lua code to run after plugin is loaded. This will be wrapped in a function. @@ -169,12 +169,12 @@ }; load = mkOption { - type = nullOr str; + type = nullOr lines; 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 + This will be wrapped in a function. ''; }; };