mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-23 13:50:44 +00:00
58 lines
977 B
Nix
58 lines
977 B
Nix
{
|
|
config,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (lib.modules) mkIf;
|
|
|
|
cfg = config.vim;
|
|
in {
|
|
vim.maps = {
|
|
normal =
|
|
mkIf cfg.disableArrows {
|
|
"<up>" = {
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
};
|
|
"<down>" = {
|
|
action = "<nop>";
|
|
|
|
noremap = false;
|
|
};
|
|
"<left>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<right>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
}
|
|
// mkIf cfg.mapLeaderSpace {
|
|
"<space>" = {
|
|
action = "<nop>";
|
|
};
|
|
};
|
|
|
|
insert = mkIf cfg.disableArrows {
|
|
"<up>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<down>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<left>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
"<right>" = {
|
|
action = "<nop>";
|
|
noremap = false;
|
|
};
|
|
};
|
|
};
|
|
}
|