mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-06 02:11:33 +00:00
binds/qmk: init (#1083)
* binds/qmk: init Create the `vim.binds.qmk` module with `enable` and `setupOpts`. * Clean up release notes Add consistent style and formatting to release notes Co-authored-by: raf <raf@notashelf.dev> * Clean up release notes (again) * binks/qmk: remove unneeded function * binds/qmk: Rename to `vim.utility.qmk` Move the `vim.binds.qmk` module to `vim.utility.qmk`. * utility/qmk: add defaults and asserts Add default values and assertions for required options. * utility/qmk: rename to utility/qmk-nvim * utility/qmk-nvim: improve assertion readability * utility/qmk-nvim: Fix links broken in module rename * Fix release notes * Add final newline to release notes --------- Co-authored-by: raf <raf@notashelf.dev>
This commit is contained in:
parent
80a2944418
commit
b7d321fd88
7 changed files with 111 additions and 6 deletions
49
modules/plugins/utility/qmk-nvim/qmk-nvim.nix
Normal file
49
modules/plugins/utility/qmk-nvim/qmk-nvim.nix
Normal file
|
@ -0,0 +1,49 @@
|
|||
{lib, ...}: let
|
||||
inherit (lib.options) mkOption mkEnableOption;
|
||||
inherit (lib.types) attrsOf nullOr enum lines str;
|
||||
inherit (lib.nvim.types) mkPluginSetupOption;
|
||||
in {
|
||||
options.vim.utility.qmk-nvim = {
|
||||
enable = mkEnableOption "QMK and ZMK keymaps in nvim";
|
||||
|
||||
setupOpts = mkPluginSetupOption "qmk.nvim" {
|
||||
name = mkOption {
|
||||
type = nullOr str;
|
||||
default = null;
|
||||
description = "The name of the layout";
|
||||
};
|
||||
|
||||
layout = mkOption {
|
||||
type = nullOr lines;
|
||||
default = null;
|
||||
description = ''
|
||||
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";
|
||||
description = "Chooses the expected hardware target";
|
||||
};
|
||||
|
||||
comment_preview = {
|
||||
position = mkOption {
|
||||
type = enum ["top" "bottom" "inside" "none"];
|
||||
default = "top";
|
||||
description = "Controls the position of the preview";
|
||||
};
|
||||
|
||||
keymap_overrides = mkOption {
|
||||
type = attrsOf str;
|
||||
default = {};
|
||||
description = ''
|
||||
Key codes to text replacements
|
||||
see <https://github.com/codethread/qmk.nvim/blob/main/lua/qmk/config/key_map.lua> for more details
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue