modules: move mappings to neovim/init

Signed-off-by: NotAShelf <raf@notashelf.dev>
Change-Id: I9b04107496df27dcda1a24ce000da3f46a6a6964
This commit is contained in:
raf 2026-01-27 12:54:02 +03:00
commit f8f1017411
Signed by: NotAShelf
GPG key ID: 29D95B64378DB4BF
6 changed files with 149 additions and 131 deletions

View file

@ -3,11 +3,6 @@
lib,
...
}: let
inherit (lib.modules) mkMerge;
inherit (lib.trivial) pipe;
inherit (lib.attrsets) mapAttrsToList;
inherit (lib.lists) flatten;
legacyMapModes = {
normal = ["n"];
insert = ["i"];
@ -24,26 +19,4 @@
cfg = config.vim;
in {
config = {
vim.keymaps = mkMerge [
(
pipe cfg.maps
[
(mapAttrsToList (
oldMode: keybinds:
mapAttrsToList (
key: bind:
bind
// {
inherit key;
mode = legacyMapModes.${oldMode};
}
)
keybinds
))
flatten
]
)
];
};
}