summaryrefslogtreecommitdiffstats
path: root/.config/nvim/after/plugin/whichkey.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.config/nvim/after/plugin/whichkey.lua28
1 files changed, 19 insertions, 9 deletions
diff --git a/.config/nvim/after/plugin/whichkey.lua b/.config/nvim/after/plugin/whichkey.lua
index 4e539db..b96a4bc 100644
--- a/.config/nvim/after/plugin/whichkey.lua
+++ b/.config/nvim/after/plugin/whichkey.lua
@@ -10,25 +10,34 @@ local ts = require('telescope.builtin')
require('telescope').load_extension('harpoon')
local wk = require('which-key')
wk.register({
+ -- harpoon
a = {
name = 'harpoon',
- a = { function() harpoon:list():append() end, 'add file', noremap = true, silent = true },
+ a = { function() harpoon:list():append() end, 'add file', noremap = true, silent = true },
e = { function() harpoon.ui:toggle_quick_menu(harpoon:list()) end, 'harpoon ui', noremap = true, silent = true },
- f = { ':Telescope harpoon marks<CR>', 'harpoon telescope ui', noremap = true, silent = true },
+ f = { ':Telescope harpoon marks<CR>', 'harpoon telescope ui', noremap = true, silent = true },
},
- b = { ':Buffers<CR>', 'buffers', noremap = true, silent = true },
- c = { name = '+nerd-commenter' },
d = { ':bd<CR>', 'close buffer', noremap = true, silent = true },
D = { '"-ddk:put = strftime(\' * %c\')<CR>', 'insert date', noremap = true, silent = true },
- e = { ':Telescope find_files<CR>', 'find files', noremap = true, silent = true },
- G = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true },
h = { ':Startify<CR>', 'startify', noremap = true, silent = true },
k = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false },
u = { vim.cmd.UndotreeToggle, 'undotree', noremap = true, silent = true },
w = { ':w<CR>', 'write buffer', noremap = true, silent = false },
- x = { ':w<CR>:bp<CR>:bd #<CR>', 'write and close buffer', noremap = true, silent = false },
+ -- trouble
+ x = {
+ name = 'trouble',
+ x = { vim.cmd.TroubleToggle, 'toggle', noremap = true, silent = true },
+ w = { ':TroubleToggle workspace_diagnostics<CR>', 'workspace', noremap = true, silent = true },
+ d = { ':TroubleToggle document_diagnostics<CR>', 'document', noremap = true, silent = true },
+ l = { ':TroubleToggle loclist<CR>', 'local list', noremap = true, silent = true },
+ q = { ':TroubleToggle quickfix<CR>', 'quickfix', noremap = true, silent = true },
+ r = { ':TroubleToggle lsp_references<CR>', 'lsp', noremap = true, silent = true },
+ },
+ -- telescope
f = {
name = 'telescope',
+ b = { ts.buffers, 'buffers', noremap = true, silent = true },
+ d = { ts.diagnostics, 'diagnostics', noremap = true, silent = true },
e = { ':Telescope harpoon marks<CR>', 'harpoon marks', noremap = true, silent = true },
f = { ts.find_files, 'find files', noremap = true, silent = true },
g = { ts.git_files, 'git files', noremap = true, silent = true },
@@ -37,13 +46,16 @@ wk.register({
end, 'grep string', noremap = true, silent = true },
t = { ':TodoTelescope keywords=TODO,HACK,WARN,PERF,NOTE,TEST<CR>', 'todo', noremap = true, silent = true }
},
+ -- git
g = {
name = 'git',
g = { vim.cmd.Git, 'git' },
+ l = { ':FloatermNew lazygit<CR>', 'lazygit', noremap = true, silent = true },
-- a = { ':Ag<CR>', 'the_silver_searcher', noremap = true, silent = true },
-- g = { ':Grep<CR>', 'grep', noremap = true, silent = true },
-- r = { ':Rg<CR>', 'ripgrep', noremap = true, silent = true },
},
+ -- neovim
v = {
name = 'nvim',
v = { vim.cmd.Ex, 'explorer', noremap = true, silent = true },
@@ -65,5 +77,3 @@ wk.setup({
triggers = { "<leader>" },
triggers_nowait = { "d" },
})
-
-vim.keymap.set('n', '<C-p>', ts.git_files)