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