local wk = require('which-key') wk.setup() -- :h ins-completion wk.register({ [''] = 'Whole lines', [''] = 'keywords in the current file', [''] = 'keywords in dictionary', [''] = 'keywords in thesaurus', [''] = 'keywords in the current and included files', [''] = 'tags', [''] = 'file names', [''] = 'definitions or macros', [''] = 'Vim command-line', [''] = 'User defined completion', [''] = 'omni completion', [''] = 'Spelling suggestions', [''] = 'stop completion', [''] = 'mini.completion force_twostep', [''] = 'mini.completion force_fallback', }, { mode = 'i', prefix = '', }) wk.register({ [vim.g.vimrc_snr .. '(q)d'] = 'TroubleToggle', [vim.g.vimrc_snr .. '(q)z'] = 'mini.zoom', }) -- gitsigns wk.register({ ['s'] = 'gitsigns.stage_hunk', ['r'] = 'gitsigns.reset_hunk', ['S'] = 'gitsigns.stage_buffer', ['u'] = 'gitsigns.undo_stage_hunk', ['R'] = 'gitsigns.reset_buffer', ['p'] = 'gitsigns.preview_hunk', ['b'] = 'gitsigns.blame_line{full=true}', ['d'] = 'gitsigns.diffthis', ['D'] = "gitsigns.diffthis('~')", ['t'] = 'gitsigns.toggle_deleted', }, { prefix = 'mh', }) wk.register({ ['s'] = 'gitsigns.stage_hunk', ['r'] = 'gitsigns.reset_hunk', }, { mode = 'v', prefix = 'mh', })