Files
dotfiles/.config/nvim/lua/plugins/treesl.lua
Felix Nehrke 2f23034101 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.
2025-09-14 20:18:35 +02:00

17 lines
504 B
Lua

local cmd = function (cmd)
return function () vim.cmd(cmd) end
end
return {
'Wansmer/treesj',
dependencies = { 'nvim-treesitter/nvim-treesitter' },
config = function()
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,
}