feat(mini): modularize the config a bit.
This commit is contained in:
parent
8d49f9b18d
commit
494ddcf985
9 changed files with 192 additions and 194 deletions
23
lua/plugins/mini/pick.lua
Normal file
23
lua/plugins/mini/pick.lua
Normal file
|
|
@ -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" })
|
||||
Loading…
Add table
Add a link
Reference in a new issue