utility/qmk: add defaults and asserts

Add default values and assertions for required options.
This commit is contained in:
Poseidon 2025-08-15 12:25:32 -05:00
commit 059c508842
2 changed files with 22 additions and 13 deletions

View file

@ -1,9 +1,6 @@
{
lib,
...
}: let
{lib, ...}: let
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.types) attrsOf enum lines str;
inherit (lib.types) attrsOf nullOr enum lines str;
inherit (lib.nvim.types) mkPluginSetupOption;
in {
options.vim.utility.qmk = {
@ -11,18 +8,20 @@ in {
setupOpts = mkPluginSetupOption "qmk.nvim" {
name = mkOption {
type = str;
type = nullOr str;
default = null;
description = "The name of the layout";
};
layout = mkOption {
type = lines;
type = nullOr lines;
default = null;
description = ''
The keyboard key layout
The keyboard key layout
see <https://github.com/codethread/qmk.nvim?tab=readme-ov-file#Layout> for more details
'';
};
variant = mkOption {
type = enum ["qmk" "zmk"];
default = "qmk";