mirror of
https://github.com/nix-community/nixvim.git
synced 2025-06-20 16:15:43 +02:00
modules/keymaps: add replace_keycodes keymap sub-option
This commit is contained in:
parent
fe95b14d52
commit
95573411bc
2 changed files with 13 additions and 1 deletions
|
@ -1,7 +1,7 @@
|
|||
{ lib }:
|
||||
let
|
||||
inherit (lib) optionalAttrs isAttrs types;
|
||||
inherit (lib.nixvim) defaultNullOpts mkNullOrStr;
|
||||
inherit (lib.nixvim) defaultNullOpts mkNullOrOption mkNullOrStr;
|
||||
in
|
||||
rec {
|
||||
# These are the configuration options that change the behavior of each mapping.
|
||||
|
@ -23,6 +23,12 @@ rec {
|
|||
desc = mkNullOrStr "A textual description of this keybind, to be shown in which-key, if you have it.";
|
||||
|
||||
buffer = defaultNullOpts.mkBool false "Make the mapping buffer-local. Equivalent to adding `<buffer>` to a map.";
|
||||
|
||||
replace_keycodes = mkNullOrOption types.bool ''
|
||||
When `expr` is `true`, replace keycodes in the resulting string.
|
||||
|
||||
Returning `nil` from the Lua `callback` is equivalent to returning an empty string.
|
||||
'';
|
||||
};
|
||||
|
||||
modes = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue