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:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user