add leaderf

This commit is contained in:
Charlotte 🦝 Delenk 2023-04-14 07:20:41 +01:00
parent 4eb942d4b6
commit 23debb1c41
Signed by: darkkirb
GPG key ID: AB2BD8DAF2E37122
2 changed files with 86 additions and 0 deletions

View file

@ -36,6 +36,8 @@ in {
EOF_991fbac8c1efc440
'';
vim.keybindings.leader = " ";
vim.opt = {
# undo/backup directories
undofile = true;

View file

@ -0,0 +1,84 @@
{pkgs, ...}: {
output.plugins = with pkgs.vimPlugins; [LeaderF];
vim.g = {
Lf_UseCache = 0;
Lf_UseMemoryCache = 0;
Lf_WildIgnore = {
dir = [".git" "__pycache__" ".DS_Store"];
file = [
"*.exe"
"*.dll"
"*.so"
"*.o"
"*.pyc"
"*.jpg"
"*.png"
"*.gif"
"*.svg"
"*.ico"
"*.db"
"*.tgz"
"*.tar.gz"
"*.gz"
"*.zip"
"*.bin"
"*.pptx"
"*.xlsx"
"*.docx"
"*.pdf"
"*.tmp"
"*.wmv"
"*.mkv"
"*.mp4"
"*.rmvb"
"*.ttf"
"*.ttc"
"*.otf"
"*.mp3"
"*.aac"
];
};
Lf_DefaultMode = "FullPath";
Lf_UseVersionControlTool = 0;
Lf_DefaultExternalTool = "rg";
Lf_ShowHidden = 1;
Lf_ShortcutF = "";
Lf_ShortcutB = "";
Lf_WorkingDirectoryMode = "a";
};
vim.keybindings.keybindings."<leader>" = {
f = {
f = {
command = "<Cmd>Leaderf file --popup<CR>";
options.silent = true;
label = "Search files";
};
g = {
command = "<Cmd>Leaderf rg --no-messages --popup<CR>";
options.silent = true;
label = "Grep files";
};
h = {
command = "<Cmd>Leaderf help --popup<CR>";
options.silent = true;
label = "Search help";
};
t = {
command = "<Cmd>Leaderf bufTag --popup<CR>";
options.silent = true;
label = "Search tags in buffer";
};
b = {
command = "<Cmd>Leaderf buffer --popup<CR>";
options.silent = true;
label = "Switch buffers";
};
r = {
command = "<Cmd>Leaderf mru --popup --absolute-path<CR>";
options.silent = true;
label = "search recent files";
};
};
};
}