Improve descriptions of key-mappings in neovim and align git-shortcuts

I struggle to remember certain shortcuts sometimes. In these cases I
rely on the "whichkey" plugin which shows a short description of for
each possible keystroke in vim. Though I was lazy and didn't maintain
these everywhere, so this change fixes that. Hopefully I can remeber all
the keys better now.

Furthermore this change contains some slight remappings regarding the
git-keymappings. I used fugitive for most of that in the past, but I saw
more potential using telescope in certain cases, especially navigating
the history.
This commit is contained in:
2025-09-14 20:18:35 +02:00
parent a9046ba8bd
commit 2f23034101
4 changed files with 44 additions and 17 deletions

View File

@@ -1,8 +1,16 @@
local cmd = function (cmd)
return function () vim.cmd(cmd) end
end
return {
'Wansmer/treesj',
keys = { '<space>m', '<space>j', '<space>s' },
dependencies = { 'nvim-treesitter/nvim-treesitter' },
config = function()
require('treesj').setup({})
require('treesj').setup({
use_default_keymaps = false,
})
vim.keymap.set("n", "<Leader>bm", cmd("TSJToggle"), { desc = "Toggle expand/collapse block" })
vim.keymap.set("n", "<Leader>bj", cmd("TSJJoin"), { desc = "Collapse block" })
vim.keymap.set("n", "<Leader>bs", cmd("TSJSplit"), { desc = "Expand block" })
end,
}