diff options
| author | Crony Akatsuki <crony@cronyakatsuki.xyz> | 2026-01-01 13:55:19 +0100 |
|---|---|---|
| committer | Crony Akatsuki <crony@cronyakatsuki.xyz> | 2026-01-01 13:55:19 +0100 |
| commit | 494ddcf9850a9e425c6c15396a5b322001d3f83c (patch) | |
| tree | 2bad558af86f20de3d836a3db57bb31ce60252c3 /lua/plugins/mini/pick.lua | |
| parent | 8d49f9b18dddcd2d4fa966227db70fb2c710e383 (diff) | |
| download | nvim-494ddcf9850a9e425c6c15396a5b322001d3f83c.zip nvim-494ddcf9850a9e425c6c15396a5b322001d3f83c.tar.gz | |
feat(mini): modularize the config a bit.
Diffstat (limited to 'lua/plugins/mini/pick.lua')
| -rw-r--r-- | lua/plugins/mini/pick.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lua/plugins/mini/pick.lua b/lua/plugins/mini/pick.lua new file mode 100644 index 0000000..e9a1a9f --- /dev/null +++ b/lua/plugins/mini/pick.lua @@ -0,0 +1,23 @@ +-- setup picker with icons +require("mini.icons").setup() +require("mini.pick").setup({ + options = { + use_cache = true, + }, +}) + +-- additional mini.pick pickers +require("mini.extra").setup() + +-- mini.pick keybindings +local patterns = { "fixme", "hack", "todo", "note", } +vim.keymap.set("n", "<Leader>ff", ":Pick files<CR>", { desc = "Search file in directory" }) +vim.keymap.set("n", "<Leader>fw", ":Pick grep_live<CR>", { desc = "Search for word in directory" }) +vim.keymap.set("n", "<Leader>fh", ":Pick help<CR>", { desc = "Search neovim help" }) +vim.keymap.set("n", "<Leader>fd", ":Pick diagnostic<CR>", { desc = "Search diagnostics" }) +vim.keymap.set("n", "<Leader>fgb", ":Pick git_branches scope='local'<CR>", { desc = "Search git branches" }) +vim.keymap.set("n", "<Leader>fgc", ":Pick git_commits<CR>", { desc = "Search git commits" }) +vim.keymap.set("n", "<Leader>fgh", ":Pick git_hunks<CR>", { desc = "Search git hunks" }) +vim.keymap.set("n", "<Leader>fp", function() + MiniExtra.pickers.hipatterns({ highlighters = patterns }) +end, { desc = "Search patterns" }) |
