treewalker.nvim
treewalker.nvim copied to clipboard
Treewalker if clause improvement
another question in the meantime, isnt there a way to cycle between if / else if / else clauses with treesitter ?
i know the if itself is 1 node with all the if else / else inside it, but still i am asking because going up 1 level with Treewalker Left actually exits exacly 1 level and puts the cursor on the needed clause
example:
- if i am inside
ifand i do Treewalker Left, it puts cursor on the start of the line whereifis - if i am inside
else ifthen doing Treewalker Left puts the cursor on the start of the line ofelse if - if i am inside
elseand doing Treewalker Left puts sthe cursor on the start of the line ofelse
Will it be hard to implementTreewalker Up/Downforifconstruction ?
Yeah it's AST node based. Up/down strictly goes to neighboring nodes. So if your parser for your language puts the else / else ifs as child nodes, then Treewalker won't be able to jump to them with up/down