Treewalker uses neovim's native Treesitter under the hood for syntax tree awareness.         Design goals include stability, ergonomics, and

Search code, repositories, users, issues, pull requests...

submited by
Style Pass
2025-01-19 03:30:07

Treewalker uses neovim's native Treesitter under the hood for syntax tree awareness. Design goals include stability, ergonomics, and simplicity.

All movement commands add to the jumplist, so if you use a movement command and then feel lost, you always have Ctrl-o available to bring you back to where you last were.

Swap{Up,Down} operate on a linewise basis, and bring along their comments, decorators, and annotations. These are meant for swapping declarations and definitions - things that take up whole lines.

Swap{Left,Right} are meant for swapping function arguments, enum members, list elements, etc. Things that are many per line. In some cases these will operate on the same nodes as Up/Down, but won't take the accoutrements.

I've found Ctrl - h / j / k / l to be a really natural flow for this plugin, and adding Shift to that for swapping just felt so clean. So here are the mappings I use:

Leave a Comment