add wilder

This commit is contained in:
Aditya 2024-03-07 09:58:32 +05:30
parent 879841c34c
commit 79fbb9b446
Signed by: aditya
SSH key fingerprint: SHA256:jL1IvWsjjlPtw6HvDIHfXfhO9IkIokNEyIfuFhSdoyU
4 changed files with 73 additions and 0 deletions

View file

@ -74,5 +74,8 @@
./utils/toggleterm.nix
./utils/ultimate-autopair.nix
./utils/undotree.nix
./utils/vim-be-good.nix
./utils/whichkey.nix
./utils/wilder.nix
];
}

View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
extraPlugins = with pkgs.vimPlugins; [
vim-be-good
];
}

20
config/utils/whichkey.nix Normal file
View file

@ -0,0 +1,20 @@
{
# TODO: Implement general mappings
plugins.which-key = {
enable = true;
ignoreMissing = false;
icons = {
breadcrumb = "»";
group = "+";
separator = ""; # ➜
};
# registrations = {
# "<leader>t" = " Terminal";
# };
window = {
border = "none";
winblend = 0;
};
};
}

44
config/utils/wilder.nix Normal file
View file

@ -0,0 +1,44 @@
{
plugins.wilder = {
enable = true;
modes = [":" "/" "?"];
pipeline = [
''
wilder.branch(
wilder.python_file_finder_pipeline({
file_command = function(ctx, arg)
if string.find(arg, '.') ~= nil then
return {'fd', '-tf', '-H'}
else
return {'fd', '-tf'}
end
end,
dir_command = {'fd', '-td'},
filters = {'cpsm_filter'},
}),
wilder.substitute_pipeline({
pipeline = wilder.python_search_pipeline({
skip_cmdtype_check = 1,
pattern = wilder.python_fuzzy_pattern({
start_at_boundary = 0,
}),
}),
}),
wilder.cmdline_pipeline({
language = 'python',
fuzzy = 1,
}),
{
wilder.check(function(ctx, x) return x == "" end),
wilder.history(),
},
wilder.python_search_pipeline({
pattern = wilder.python_fuzzy_pattern({
start_at_boundary = 0,
}),
})
) ''
];
};
}