From f9856a27b9e7bdbfa5639d97cb3e669a42e0e88c Mon Sep 17 00:00:00 2001 From: Ismo Vuorinen Date: Tue, 21 Jan 2025 15:06:04 +0200 Subject: [PATCH] chore(nvim): drop mini.jump, mini.move, update docs --- config/nvim/lua/plugins/mini.lua | 22 +--- docs/nvim-keybindings.md | 192 +++++++++++++------------------ 2 files changed, 83 insertions(+), 131 deletions(-) diff --git a/config/nvim/lua/plugins/mini.lua b/config/nvim/lua/plugins/mini.lua index 43eb1ff..65cb124 100644 --- a/config/nvim/lua/plugins/mini.lua +++ b/config/nvim/lua/plugins/mini.lua @@ -165,20 +165,6 @@ return { -- Replaced lukas-reineke/indent-blankline.nvim require('mini.indentscope').setup() - -- Jump to next/previous single character - require('mini.jump').setup { - mappings = { - forward = 'f', - backward = 'F', - forward_till = 't', - backward_till = 'T', - repeat_jump = ';', - }, - } - - -- Move lines and blocks of text - require('mini.move').setup() - -- Text edit operators -- g= - Evaluate text and replace with output -- gx - Exchange text regions @@ -223,11 +209,11 @@ return { content = { active = function() local mode, mode_hl = sl.section_mode { trunc_width = 120 } - local git = sl.section_git { trunc_width = 75 } - local diagnostics = sl.section_diagnostics { trunc_width = 75 } + local git = sl.section_git { trunc_width = 9999 } + local diagnostics = sl.section_diagnostics { trunc_width = 9999 } local filename = sl.section_filename { trunc_width = 9999 } - local fileinfo = sl.section_fileinfo { trunc_width = 120 } - local location = sl.section_location { trunc_width = 75 } + local fileinfo = sl.section_fileinfo { trunc_width = 9999 } + local location = sl.section_location { trunc_width = 9999 } return sl.combine_groups { { hl = mode_hl, strings = { mode } }, { hl = 'statuslineDevinfo', strings = { git, diagnostics } }, diff --git a/docs/nvim-keybindings.md b/docs/nvim-keybindings.md index 98f8093..98b40a2 100644 --- a/docs/nvim-keybindings.md +++ b/docs/nvim-keybindings.md @@ -54,7 +54,7 @@ n xq * :Trouble quickfix Quickfix n xl * :Trouble loclist Location List -n xd * :Trouble document_diagnostics +n xd * :Trouble diagnostics Document Diagnostics n sx * :Telescope import Telescope: Import @@ -64,7 +64,7 @@ n ss * :Telescope treesitter Treesitter n sq * :Telescope quickfix Quickfix -n sp * :lua require("telescope").extensions.lazy_plugins.lazy_plugins() +n sp * ~/.config/nvim/lua/keymaps.lua Lazy Plugins n so * :Telescope oldfiles Old Files @@ -80,14 +80,6 @@ n sd * :Telescope diagnostics Search Diagnostics n sc * :Telescope commands Commands -n pt * :PhpactorTransform - PHPactor: Transform -n ps * :PhpactorClassSearch - PHPactor: Class Search -n pn * :PhpactorClassNew - PHPactor: Class New -n pm * :PhpactorContextMenu - PHPactor: Context Menu n / * ~/.config/nvim/lua/keymaps.lua Fuzzily search in current buffer n , * :Telescope buffers @@ -104,37 +96,33 @@ n cbd * CBd CB: Remove a box n cbb * CBccbox CB: Box Title -n cw * :Lspsaga diagnostic_jump_next - Diagnostic Jump Next -n cv * :Lspsaga diagnostic_jump_prev - Diagnostic Jump Prev -n cu * :Lspsaga preview_definition - Preview Definition -n cT * :Telescope lsp_type_definitions - LSP Type Definitions -n ct * :Lspsaga peek_type_definition - Peek Type Definition +n cwd * ~/.config/nvim/lua/keymaps.lua + Dynamic Workspace Symbols +n cws * ~/.config/nvim/lua/keymaps.lua + Workspace Symbols +n ct * ~/.config/nvim/lua/keymaps.lua + treesitter n cs * :Telescope lsp_document_symbols LSP Document Symbols -n cR * :Lspsaga rename ++project - Rename Project wide -n cr * :Lspsaga rename +n cr * ~/.local/share/bob/v0.10.2/nvim-macos-arm64/share/nvim/runtime/lua/vim/lsp/buf.lua Rename -n cp * :Lspsaga peek_definition - Peek Definition -n cl * :Lspsaga show_cursor_diagnostics - Cursor Diagnostics -n ci * :Lspsaga implement +n cp * ~/.config/nvim/lua/keymaps.lua + Type Definition +n ci * ~/.config/nvim/lua/keymaps.lua Implementations n cg * :lua require("neogen").generate() Generate annotations -n cd * :Lspsaga show_line_diagnostics - Line Diagnostics -n cco * :Lspsaga outgoing_calls - Outgoing Calls -n cci * :Lspsaga incoming_calls - Incoming Calls -n ca * :Lspsaga code_action +x cf * :lua vim.lsp.buf.format() + Format +n cf * :lua vim.lsp.buf.format() + Format +n cd * ~/.config/nvim/lua/keymaps.lua + Definitions +n cco * ~/.config/nvim/lua/keymaps.lua + Outgoing calls +n cci * ~/.config/nvim/lua/keymaps.lua + Incoming calls +n ca * :lua vim.lsp.buf.code_action() Code Action n bw * :lua MiniBufremove.wipeout() Wipeout @@ -150,6 +138,14 @@ n bd * :lua MiniBufremove.delete() Delete n ba * :%bd|e#|bd# Close all except current +n apt * :PhpactorTransform + PHPactor: Transform +n aps * :PhpactorClassSearch + PHPactor: Class Search +n apn * :PhpactorClassNew + PHPactor: Class New +n apm * :PhpactorContextMenu + PHPactor: Context Menu n av * :silent TestVisit Test Visit n al * :silent TestLast @@ -184,7 +180,7 @@ n tmc * setlocal cursorline! cursorline? Toggle 'cursorline' n tmb * lua vim.o.bg = vim.o.bg == "dark" and "light" or "dark"; print(vim.o.bg) Toggle 'background' - cf * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +os cf * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua Format buffer x # * vim/_defaults.lua :help v_#-default @@ -194,17 +190,11 @@ n % (MatchitNormalForward) n & * :&& :help &-default n '? & :echo ":Start" dispatch#start_focus(v:count > 1 ? 0 : v:count ? line(".") : -1) -n '! & 30_:.Start! -n ' & 30_:.Start -n ' & 30_:.Start +n '! & 10_:.Start! +n ' & 10_:.Start +n ' & 10_:.Start x * * vim/_defaults.lua :help v_star-default -o ; * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua - Repeat jump -x ; * lua MiniJump.jump() - Repeat jump -n ; * lua MiniJump.jump() - Repeat jump v < * ' : '@' :help v_@-default -o F * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua - Jump backward -x F * lua MiniJump.smart_jump(true, false) - Jump backward -n F * lua MiniJump.smart_jump(true, false) - Jump backward -n K * :Lspsaga hover_doc +n K * :lua vim.lsp.buf.hover() Hover Documentation n Q * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/clue.lua Execute macro without 'mini.clue' triggers x Q * mode() ==# 'V' ? ':normal! @=reg_recorded()' : 'Q' :help v_Q-default -o T * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua - Jump backward till -x T * lua MiniJump.smart_jump(true, true) - Jump backward till -n T * lua MiniJump.smart_jump(true, true) - Jump backward till n Y * y$ :help Y-default -n Zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +o Zk * ~/.config/nvim/lua/keymaps.lua Flash Treesitter -o Zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +x Zk * ~/.config/nvim/lua/keymaps.lua Flash Treesitter -x Zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +n Zk * ~/.config/nvim/lua/keymaps.lua Flash Treesitter o [% (MatchitOperationMultiBackward) x [% (MatchitVisualMultiBackward) @@ -289,10 +267,10 @@ n ]h * lua MiniDiff.goto_hunk('next') Next hunk n ]d * vim/_defaults.lua Jump to the next diagnostic -n `? & 30_:.FocusDispatch -n `! & 30_:.Dispatch! -n ` & 30_:.Dispatch -n ` & 30_:.Dispatch +n `? & 10_:.FocusDispatch +n `! & 10_:.Dispatch! +n ` & 10_:.Dispatch +n ` & 10_:.Dispatch x a% (MatchitVisualTextObject) o ax (textobj-xmlattr-attr-a) x ax (textobj-xmlattr-attr-a) @@ -300,25 +278,19 @@ o ai * lua MiniIndentscope.textobject(true) Object scope with border x ai * lua MiniIndentscope.textobject(true) Object scope with border -o f * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua - Jump forward -x f * lua MiniJump.smart_jump(false, false) - Jump forward -n f * lua MiniJump.smart_jump(false, false) - Jump forward n gR * :RegexplainerToggle Toggle Regexplainer o g% (MatchitOperationBackward) x g% (MatchitVisualBackward) n g% (MatchitNormalBackward) n g`? & :echo ":Spawn" dispatch#spawn_focus(v:count > 1 ? 0 : v:count ? line(".") : -1) -n g`! & 30_:.Spawn! -n g` & 30_:.Spawn -n g` & 30_:.Spawn +n g`! & 10_:.Spawn! +n g` & 10_:.Spawn +n g` & 10_:.Spawn n g'? & :echo ":Spawn" dispatch#spawn_focus(v:count > 1 ? 0 : v:count ? line(".") : -1) -n g'! & 30_:.Spawn! -n g' & 30_:.Spawn -n g' & 30_:.Spawn +n g'! & 10_:.Spawn! +n g' & 10_:.Spawn +n g' & 10_:.Spawn x gS * :lua MiniSplitjoin.toggle({ region = MiniSplitjoin.get_visual_region() }) Toggle arguments n gS * v:lua.MiniSplitjoin.operator("toggle") . " " @@ -400,9 +372,9 @@ x k * v:count == 0 ? 'gk' : 'k' n k * v:count == 0 ? 'gk' : 'k' Move up n m? & :echo ":Dispatch" dispatch#make_focus(v:count > 1 ? 0 : v:count ? line(".") : -1) -n m! & 30_:.Make! -n m & 30_:.Make -n m & 30_:.Make +n m! & 10_:.Make! +n m & 10_:.Make +n m & 10_:.Make n shn * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua Highlight next surrounding n sFn * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua @@ -439,17 +411,11 @@ n sd * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua Delete surrounding n sa * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/surround.lua Add surrounding -o t * ~/.local/share/nvim/lazy/mini.nvim/lua/mini/jump.lua - Jump forward till -x t * lua MiniJump.smart_jump(false, true) - Jump forward till -n t * lua MiniJump.smart_jump(false, true) - Jump forward till -o zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +o zk * ~/.config/nvim/lua/keymaps.lua Flash -x zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +x zk * ~/.config/nvim/lua/keymaps.lua Flash -n zk * ~/.local/share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/keys.lua +n zk * ~/.config/nvim/lua/keymaps.lua Flash n * :FloatermToggle Toggle Floaterm @@ -492,30 +458,30 @@ x (MatchitVisualBackward) * :call matchit#Match_wrapper('',0,'v')(MatchitVisualForward) * :call matchit#Match_wrapper('',1,'v'):if col("''") != col("$") | exe ":normal! m'" | endifgv`` n (MatchitNormalBackward) * :call matchit#Match_wrapper('',0,'n') n (MatchitNormalForward) * :call matchit#Match_wrapper('',1,'n') -n 30_:. & :=getcmdline() =~ ',' ? "\0250" : "" -o (textobj-xmlattr-attr-i) & 26_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-i","o") -v (textobj-xmlattr-attr-i) & 26_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-i","v") -o (textobj-xmlattr-attr-a) & 26_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-a","o") -v (textobj-xmlattr-attr-a) & 26_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-a","v") -n 26_ * 26_ - 26_(save-cursor-pos) * 26_save_cursor_pos() +s luasnip-jump-prev * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Jump to the previous node +s luasnip-jump-next * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Jump to the next node +s luasnip-prev-choice * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Change to the previous choice from the choiceNode +s luasnip-next-choice * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Change to the next choice from the choiceNode +s luasnip-expand-snippet * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Expand the current snippet +s luasnip-expand-or-jump * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Expand or jump in the current snippet + luasnip-expand-repeat * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Repeat last node expansion +n luasnip-delete-check * ~/.local/share/nvim/lazy/LuaSnip/plugin/luasnip.lua + LuaSnip: Removes current snippet from jumplist n PlenaryTestFile * :lua require('plenary.test_harness').test_file(vim.fn.expand("%:p")) -n * lua MiniMove.move_line('up') - Move line up -n * lua MiniMove.move_line('down') - Move line down -n * lua MiniMove.move_line('right') - Move line right -n * lua MiniMove.move_line('left') - Move line left -x * lua MiniMove.move_selection('up') - Move up -x * lua MiniMove.move_selection('down') - Move down -x * lua MiniMove.move_selection('right') - Move right -x * lua MiniMove.move_selection('left') - Move left +o (textobj-xmlattr-attr-i) & 14_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-i","o") +v (textobj-xmlattr-attr-i) & 14_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-i","v") +o (textobj-xmlattr-attr-a) & 14_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-a","o") +v (textobj-xmlattr-attr-a) & 14_(save-cursor-pos):call g:__textobj_xmlattr.do_by_pattern("select","attr-a","v") +n 14_ * 14_ + 14_(save-cursor-pos) * 14_save_cursor_pos() +n 10_:. & :=getcmdline() =~ ',' ? "\0250" : "" x * silent! update | redraw Save and go to Normal mode n * :w! @@ -528,4 +494,4 @@ n * :lua vim.lsp.buf.signature_help() Signature ``` -- Generated on Tue 7 Jan 2025 21:37:18 EET +- Generated on Tue 21 Jan 2025 15:03:23 EET