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.
17 lines
504 B
Lua
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,
|
|
}
|