lazy: enabled option accepts luaInline instead of str

Makes inline Lua enabled options evaluate to Lua instead of string
literals.
This commit is contained in:
Jaren Glenn 2025-08-26 19:34:53 -06:00
commit f6cfc3ab4b
2 changed files with 6 additions and 2 deletions

View file

@ -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.<name>.enabled` Lua evaluation.

View file

@ -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";
};