diff --git a/nvim/lua/plugins/which-key.lua b/nvim/lua/plugins/which-key.lua index d7770554..d0a89eb2 100644 --- a/nvim/lua/plugins/which-key.lua +++ b/nvim/lua/plugins/which-key.lua @@ -10,30 +10,38 @@ wk.register({ [''] = { 'bprevious', 'buffer navigation with arrow keys' }, g = { - b = { 'Gitsigns blame_line', '' }, - f = { 'execute "/\\v^[<\\|=>]{7}/"', '' }, + a = { 'lua vim.lsp.buf.code_action()', 'run code action' }, + b = { 'Gitsigns blame_line', 'git blame line' }, d = { 'lua vim.lsp.buf.definition()', 'show/go to definition' }, - i = { 'lua vim.lsp.buf.implementation()', 'show/go to implementation' }, - r = { 'lua vim.lsp.buf.references()', 'show/go to referennces' }, + e = { 'lua vim.diagnostic.goto_next()', 'go to next error in file' }, + f = { 'lua vim.lsp.buf.formatting()', 'format file with LSP' }, + h = { 'lua vim.lsp.buf.hover()', 'show hover info' }, + r = { 'lua vim.lsp.buf.rename()', 'lsp rename' }, + x = { 'execute "/\\v^[<\\|=>]{7}/"', 'find git conflicts in file' }, + + D = { 'lua vim.lsp.buf.declaration()', 'show/go to declaration' }, + I = { 'lua vim.lsp.buf.implementation()', 'show/go to implementation' }, + R = { 'lua vim.lsp.buf.references()', 'show/go to referennces' }, }, - K = { '', 'K man-pages mapping removed' }, j = { 'gj', 'j and k with wrapped lines' }, k = { 'gk', 'j and k with wrapped lines' }, n = { 'nzzzv', 'kepping it centered with n' }, - v = { '', 'remapping visual/visual-block mode' }, s = { function() require('flash').jump() end, 'flash jump' }, + v = { '', 'remapping visual/visual-block mode' }, + + K = { '', 'K man-pages mapping removed' }, N = { 'Nzzzv', 'kepping it centered with N' }, Q = { '', 'Q ex-mode-mapping removed' }, S = { function() require('flash').treesitter() end, 'flash treesitter select' }, - Y = { 'y$', 'yank till end of line with Y'}, + Y = { 'y$', 'yank till end of line with Y' }, -- with as modifier - [''] = { 'NavigatorLeft', '' }, - [''] = { 'NavigatorDown', '' }, - [''] = { 'NavigatorUp', '' }, - [''] = { 'NavigatorRight', '' }, - [''] = { 'v', '' }, + [''] = { 'NavigatorLeft', 'move to the lefthand split' }, + [''] = { 'NavigatorDown', 'move to the rigthand split' }, + [''] = { 'NavigatorUp', 'move to the upper split' }, + [''] = { 'NavigatorRight', 'move to the lower split' }, + [''] = { 'v', 'remapping visual/visual-block mode' }, -- with as modifier [''] = { ':move .-2', 'bubbling lines with alt-hjkl', noremap = false }, @@ -46,29 +54,23 @@ wk.register({ wk.register({ ['\\'] = { 'vl', 'Vertical split' }, ['-'] = { 'sj', 'Horizontal split' }, - [','] = { 'Telescope find_files', 'Telescope find files' }, - ['.'] = { 'Telescope buffers', 'Telescope find buffers' }, - ['\''] = { 'Telescope git_files', 'Telescope in git files' }, - ['/'] = { 'Telescope search_history', 'Telescope find in search history' }, - [';'] = { 'Telescope command_history', 'Telescope find in command history' }, - [']'] = { 'Telescope current_buffer_fuzzy_find', 'Telescope in current buffer' }, + [','] = { 'Telescope find_files', 'find files' }, + ['.'] = { 'Telescope buffers', 'find buffers' }, + ['\''] = { 'Telescope git_files', 'find in git files' }, + [';'] = { 'Telescope command_history', 'find in command history' }, + ['/'] = { 'Telescope search_history', 'find in search history' }, + [']'] = { 'Telescope current_buffer_fuzzy_find', 'find line in current buffer' }, - a = { 'Telescope live_grep', '' }, - b = { 'Telescope git_branches', '' }, - c = { 'Telescope git_bcommits', '' }, - d = { 'lua vim.lsp.buf.declaration()', '' }, - e = { 'lua vim.diagnostic.goto_next()', '' }, - f = { 'lua vim.lsp.buf.formatting()', '' }, - h = { 'lua vim.lsp.buf.hover()', '' }, - r = { 'lua vim.lsp.buf.rename()', '' }, - x = { 'lua vim.lsp.buf.code_action()', '' }, - l = { 'FloatermNew lazygit', '' }, - t = { 'FloatermNew', '' }, + a = { 'Telescope live_grep', 'live ripgrep' }, + b = { 'Telescope git_branches', 'git branches' }, + c = { 'Telescope git_bcommits', 'commits for buffer' }, + l = { 'FloatermNew lazygit', 'open lazygit' }, + t = { 'FloatermNew', 'open new terminal' }, v = { - ve = { 'e $MYVIMRC', '' }, - vr = { 'source $MYVIMRC', '' }, + e = { 'e $MYVIMRC', 'edit vimrc' }, + r = { 'source $MYVIMRC', 'source vimrc' }, }, - w = { 'set wrap! wrap?', '' }, + w = { 'set wrap! wrap?', 'toggle line-wrapping' }, }, { prefix = '' }) -- visual-mode mappings