neovim/lua/which-key-config.lua
2025-03-01 14:43:50 +01:00

34 lines
1.8 KiB
Lua

local wk = require("which-key")
wk.add({
{
"<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>x", desc = "Toggle Trouble" },
{ "<leader>xl", "<cmd>Trouble loclist toggle<cr>", desc = "" },
{ "<leader>xq", "<cmd>Trouble quickfix toggle<cr>", desc = "" },
{ "<leader>xr", "<cmd>Trouble lsp_references toggle<cr>", desc = "" },
{ "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", desc = "Open Trouble" },
{ "<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" },
})