navigation.lua 722 B

12345678910111213141516171819202122232425262728
  1. local MiniJump = require('mini.jump')
  2. local Treewalker = require('treewalker')
  3. -- repeatable f/t
  4. MiniJump.setup({
  5. mappings = {
  6. repeat_jump = '',
  7. },
  8. delay = {
  9. highlight = 10000000,
  10. },
  11. })
  12. -- Treesitter navigation
  13. Treewalker.setup()
  14. vim.keymap.set({ 'n', 'v' }, '<C-k>', '<cmd>Treewalker Up<cr>')
  15. vim.keymap.set({ 'n', 'v' }, '<C-j>', '<cmd>Treewalker Down<cr>')
  16. vim.keymap.set({ 'n', 'v' }, '<C-h>', '<cmd>Treewalker Left<cr>')
  17. vim.keymap.set({ 'n', 'v' }, '<C-l>', '<cmd>Treewalker Right<cr>')
  18. -- jumplist navigation #bracketed
  19. vim.keymap.set('n', '[f', '<C-O>')
  20. vim.keymap.set('n', ']f', '<C-I>')
  21. -- window navigation #bracketed
  22. vim.keymap.set('n', '[w', '<C-w>W')
  23. vim.keymap.set('n', ']w', '<C-w>w')