Easily jump between root level nodes in code.
With packer.nvim
use {
'gnarus-g/ts-node-jumps.nvim',
requires = {
"nvim-treesitter/nvim-treesitter"
}
}
local node_jumps = require "ts-node-jumps"
vim.keymap.set("n", "<up>", node_jumps.go_to_prev)
vim.keymap.set("n", "<down>", node_jumps.go_to_next)
Up or Down to jump one node.
Add a count before the keystroke to modify how much to jump; e.g 3Up