neovim/lua/plugins/which-key.lua
2025-03-10 21:17:43 +01:00

38 lines
1.6 KiB
Lua

return {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
preset = "helix",
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = true })
end,
desc = "Buffer Local Keymaps (which-key)",
},
{ "<leader>bt", "<cmd>BlameToggle virtual<cr>", desc = "Toggle Virtual Blame" },
{ "<leader>c", desc = "NerdCommenter" },
{ "<leader>f", desc = "Telescope - Finder" },
{ "<leader>fb", "<cmd>Telescope buffers<CR>", desc = "Find Open Buffers" },
{ "<leader>ff", require("telescope").extensions.file_browser.file_browser, desc = "Find File" },
{ "<leader>fg", "<cmd>Telescope live_grep<CR>", desc = "Live Grep" },
{ "<leader>fh", "<cmd>Telescope help_tags<CR>", desc = "Find Help" },
{ "<leader>fi", "<cmd>Telescope builtin<cr>", desc = "Search all Telescope builtins" },
{ "<leader>ft", "<cmd>TodoTelescope <cr>", desc = "Open Todo in Telescope" },
{ "<leader>fu", "<cmd>UrlView<cr>", desc = "Display and open URLs in current buffer" },
{ "<leader>n", desc = "Terminal" },
{ "<leader>nb", "<cmd>lua _Lazygit_toggle()<CR>", desc = "Open Lazygit" },
{ "<leader>nj", "<cmd>ToggleTerm<CR>", desc = "Open Terminal" },
{ "<leader>r", "<cmd>lua vim.lsp.buf.rename()<CR>", desc = "Rename a token" },
{ "<leader>t1", "<Cmd>BufferGoto 1<CR>", desc = "Go to Buffer 1" },
{ "<leader>td", "<Cmd>BufferClose<CR>", desc = "Close Current Buffer" },
{ "<leader>tt", require("telescope").extensions.file_browser.file_browser, desc = "Open the file browser" },
{
"/",
require("telescope.builtin").current_buffer_fuzzy_find,
desc = "Search for a string in the current buffer",
},
},
}