From f6cfc3ab4beadd509548ea768927329f280fce8c Mon Sep 17 00:00:00 2001 From: Jaren Glenn Date: Tue, 26 Aug 2025 19:34:53 -0600 Subject: [PATCH] lazy: enabled option accepts luaInline instead of str Makes inline Lua enabled options evaluate to Lua instead of string literals. --- docs/release-notes/rl-0.8.md | 4 ++++ modules/wrapper/lazy/lazy.nix | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/rl-0.8.md b/docs/release-notes/rl-0.8.md index faecdbc4..41aee57e 100644 --- a/docs/release-notes/rl-0.8.md +++ b/docs/release-notes/rl-0.8.md @@ -523,3 +523,7 @@ [diced](https://github.com/diced): - Fixed `typescript` treesitter grammar not being included by default. + +[derethil](https://github.com/derethil): + +- Fix `vim.lazy.plugins..enabled` Lua evaluation. diff --git a/modules/wrapper/lazy/lazy.nix b/modules/wrapper/lazy/lazy.nix index eb1f5cdf..cef54360 100644 --- a/modules/wrapper/lazy/lazy.nix +++ b/modules/wrapper/lazy/lazy.nix @@ -1,7 +1,7 @@ {lib, ...}: let inherit (lib.options) mkOption mkEnableOption; inherit (lib.types) enum listOf submodule nullOr str bool int attrsOf anything either oneOf lines; - inherit (lib.nvim.types) pluginType; + inherit (lib.nvim.types) pluginType luaInline; inherit (lib.nvim.config) mkBool; lznKeysSpec = submodule { @@ -98,7 +98,7 @@ # lz.n options enabled = mkOption { - type = nullOr (either bool str); + type = nullOr (either bool luaInline); default = null; description = "When false, or if the lua function returns false, this plugin will not be included in the spec"; };