A Neovim plugin for syntax tree-aware navigation and swapping of code objects like functions, blocks, and statements.
Treewalker.nvim is a Neovim plugin that uses Tree-sitter to enable syntax tree-aware navigation and swapping of code objects. It allows developers to move through and rearrange functions, blocks, statements, and other structural elements intuitively, based on the abstract syntax tree rather than plain text.
Neovim users who want more intelligent code navigation and editing, particularly developers working with structured languages who frequently refactor or rearrange code.
It provides a stable, ergonomic, and dependency-free alternative to other tree-based navigation plugins, with a focus on simplicity and robust handling of code structure across various languages.
A neovim plugin for moving around your code in a syntax tree aware manner
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Built with 100% Lua and includes a robust test suite with CI, ensuring minimal bugs and consistent performance, as emphasized in the README's design goals.
Uses Tree-sitter to move through code structures, skipping irrelevant nodes for fluid traversal, demonstrated by the Up/Down/Left/Right movement commands that add to the jumplist.
Offers linewise swapping that preserves comments and nodewise swapping for arguments or list elements, making refactoring efficient and context-aware, as detailed in the swapping commands.
Written entirely in Lua with no external dependencies, reducing plugin bloat and simplifying installation, as highlighted in the README badges and description.
Lacks visual selection swap capabilities, a feature present in alternatives like syntax-tree-surfer, which limits feedback for some editing workflows, as acknowledged in issue #32.
Relies entirely on Neovim's Tree-sitter integration, so functionality and accuracy depend on the quality and availability of language parsers, which can be inconsistent across languages.
Requires manual key mapping and Lua setup for optimal use, which might be challenging for users not comfortable with Neovim configuration or scripting, despite the provided examples.