mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-09 20:01:34 +00:00
utility/qmk: add defaults and asserts
Add default values and assertions for required options.
This commit is contained in:
parent
ea55488f04
commit
059c508842
2 changed files with 22 additions and 13 deletions
|
@ -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";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue