nixvimConfigs/fiesta/setups/fuzzy-finder: improve code

This commit is contained in:
Gabriel Arazas 2024-02-02 17:28:07 +08:00
parent a8dfc4e162
commit e38968d666
No known key found for this signature in database
GPG Key ID: ADE0C41DAB221FCC

View File

@ -15,15 +15,15 @@ in
keymaps = keymaps =
let let
bindingPrefix = "<leader>f"; bindingPrefix = "<leader>f";
mkTelescopeKeymap = acc: binding: settings: mkTelescopeKeymap = binding: settings:
acc ++ [ lib.mergeAttrs
(lib.mergeAttrs { {
mode = "n"; mode = "n";
key = "${bindingPrefix}${binding}"; key = "${bindingPrefix}${binding}";
} settings) }
]; settings;
in in
lib.foldlAttrs mkTelescopeKeymap [ ] ({ lib.mapAttrsToList mkTelescopeKeymap ({
"A" = { "A" = {
options.desc = "Resume from last use"; options.desc = "Resume from last use";
action = "require('telescope.builtin').resume"; action = "require('telescope.builtin').resume";