modules/keymaps: fix false-positive lua warning

This commit is contained in:
Matt Sturgeon 2024-05-31 20:38:53 +01:00
parent db32a4ebda
commit 29922e13f7
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 12 additions and 4 deletions

View file

@ -80,6 +80,9 @@ rec {
mkMapOptionSubmodule =
defaults:
# TODO remove assert once `lua` option is gone
# This is here to ensure no uses of `mkMapOptionSubmodule` set a `lua` default
assert !(defaults ? lua);
(
with types;
submodule {
@ -104,7 +107,7 @@ rec {
);
lua = mkOption {
type = bool;
type = nullOr bool;
description = ''
If true, `action` is considered to be lua code.
Thus, it will not be wrapped in `""`.
@ -112,7 +115,7 @@ rec {
This option is deprecated and will be removed in 24.11.
You should use a "raw" action instead, e.g. `action.__raw = ""`.
'';
default = defaults.lua or false;
default = null;
visible = false;
};