build: move keymaps to the end

This commit is contained in:
Dmitriy Pleshevskiy 2024-04-26 10:35:27 +03:00
parent 13177e2c36
commit bf360c7fbc
Signed by: pleshevskiy
GPG key ID: 17041163DA10A9A2

View file

@ -36,14 +36,14 @@ in
(lib.flip lib.mapAttrsToList config.vim.g (k: set "vim.g.${k}")) (lib.flip lib.mapAttrsToList config.vim.g (k: set "vim.g.${k}"))
# Opts # Opts
(lib.flip lib.mapAttrsToList config.vim.opt (k: set "vim.opt.${k}")) (lib.flip lib.mapAttrsToList config.vim.opt (k: set "vim.opt.${k}"))
# Keymaps
(lib.flip map config.vim.keymap.set ({ mode, lhs, rhs, ... } @ vars:
call "vim.keymap.set" [ mode lhs rhs (removeAttrs vars [ "mode" "lhs" "rhs" ]) ]
))
# Plugins # Plugins
(map (v: v.genConfig) (filter (v: !v.isDependency) (attrValues config.plugin))) (map (v: v.genConfig) (filter (v: !v.isDependency) (attrValues config.plugin)))
# Cmd # Cmd
(lib.optional (config.vim.cmd != "") (call "vim.cmd" config.vim.cmd)) (lib.optional (config.vim.cmd != "") (call "vim.cmd" config.vim.cmd))
# Keymaps
(lib.flip map config.vim.keymap.set ({ mode, lhs, rhs, ... } @ vars:
call "vim.keymap.set" [ mode lhs rhs (removeAttrs vars [ "mode" "lhs" "rhs" ]) ]
))
])); ]));
plugins = lib.mapAttrsToList (k: v: v.package) config.plugin; plugins = lib.mapAttrsToList (k: v: v.package) config.plugin;