local demicolon = require('demicolon') local MiniBracketed = require('mini.bracketed') local Treewalker = require('treewalker') -- ,/; for bracket motions too demicolon.setup({ keymaps = { disabled_keys = { -- this is paste with indent, not a motion 'p', -- we bind these to ; and , ']', '[', } } }) vim.keymap.set('n', ']]', ';', { remap = true }) vim.keymap.set('n', '[[', ',', { remap = true }) -- more bracket motions MiniBracketed.setup({ -- some of our mappings and the builtin mappings overlap with these so enable -- only those we actually want to use buffer = { suffix = '' }, comment = { suffix = '' }, conflict = { suffix = '' }, diagnostic = { suffix = '' }, file = { suffix = '' }, indent = { suffix = '' }, jump = { suffix = '' }, location = { suffix = '' }, oldfile = { suffix = '' }, quickfix = { suffix = '' }, treesitter = { suffix = '' }, window = { suffix = '' }, yank = { suffix = '' }, undo = { suffix = 'u' }, }) -- Treesitter navigation Treewalker.setup() vim.keymap.set({ 'n', 'v' }, '', 'Treewalker Up') vim.keymap.set({ 'n', 'v' }, '', 'Treewalker Down') vim.keymap.set({ 'n', 'v' }, '', 'Treewalker Left') vim.keymap.set({ 'n', 'v' }, '', 'Treewalker Right') -- jumplist navigation #bracketed vim.keymap.set('n', '[f', '') vim.keymap.set('n', ']f', '') -- window navigation #bracketed vim.keymap.set('n', '[w', 'W') vim.keymap.set('n', ']w', 'w')