mirror of
https://github.com/NotAShelf/neovim-flake.git
synced 2024-12-22 09:49:49 +01:00
b71bf75dcd
* feat: rewrite vim.maps * modules/mappings: enable silent by default * docs: add entry for vim.maps rewrite * lib/binds: improve code, adjust functions to new api
34 lines
574 B
Nix
34 lines
574 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
|
|
cfg = config.vim;
|
|
in {
|
|
config = {
|
|
vim.maps = mkIf cfg.disableArrows {
|
|
"<up>" = {
|
|
mode = ["n" "i"];
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<down>" = {
|
|
mode = ["n" "i"];
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<left>" = {
|
|
mode = ["n" "i"];
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<right>" = {
|
|
mode = ["n" "i"];
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
};
|
|
};
|
|
}
|