A Neovim plugin for region selection using hints on abstract syntax tree nodes powered by tree-sitter.
Treehopper is a Neovim plugin that provides region selection using hints on the abstract syntax tree nodes of a document. It solves the problem of imprecise text selection in code editing by allowing developers to select regions based on the underlying syntax structure rather than plain text. This enables more accurate and efficient manipulation of code blocks, functions, or other syntactic elements.
Neovim users who write code and want more precise, semantic text selection and navigation capabilities, particularly those working with languages supported by tree-sitter parsers.
Developers choose Treehopper because it offers AST-aware selection that is more accurate than traditional text objects, integrates seamlessly with tree-sitter and LSP, and provides a fast, hint-based interface for navigating code structure without leaving the keyboard.
Region selection with hints on the AST nodes of a document powered by treesitter
Selects code regions based on syntax nodes rather than text, enabling more accurate manipulation of functions or blocks, as shown in the demo GIF.
Uses tree-sitter parsers for robust syntax analysis when available, ensuring reliable AST generation for supported languages, per the README.
Falls back to Neovim's built-in LSP with selectionRange if no parser exists, broadening compatibility but with potential accuracy trade-offs.
Allows customization of hint keys for fast navigation, improving workflow efficiency with user-defined shortcuts, as detailed in the configuration section.
Requires installation of tree-sitter parsers or LSP setup, which can be complex and language-specific, limiting out-of-the-box functionality.
Only works with Neovim 0.7.2+, excluding users of Vim or other editors, as stated in the requirements.
Needs key mappings and dependency on hop.nvim for movement features, adding configuration steps that may deter users seeking plug-and-play solutions.
tree-climber.nvim is a Neovim plugin that provides intuitive motions for navigating and manipulating the syntax tree generated by Tree-sitter. It enables developers to move between nodes (parent, child, siblings) and swap neighboring nodes directly within the abstract syntax tree, enhancing code editing efficiency. ## Key Features - **Tree Navigation** — Jump to parent, child, next sibling, and previous sibling nodes within the Tree-sitter syntax tree. - **Node Swapping** — Swap neighboring nodes to quickly restructure code. - **Node Selection** — Select nodes as text objects using a mapping like `in` for "inner node." - **Multi-Language Support** — Works across multi-language files and within comments, unlike some alternatives. - **Depth Preservation** — Maintains tree depth between jumps, allowing easy return to previous positions. - **Single-Child Squashing** — Simplifies navigation by collapsing parents with only one child. ## Philosophy tree-climber.nvim aims to provide a unified, abstract way to navigate Tree-sitter trees without requiring per-language configurations, making it a versatile tool for code editing.
Context-aware indent textobject powered by Treesitter. `vai` to select current context.
treemonkey.nvim is a Neovim plugin designed for selecting Tree-sitter nodes within code using a label-based system. It addresses common problems in similar plugins where overlapping node positions make selection ambiguous or visually confusing. ## Key Features - **Hierarchical Labeling** — Labels start of nodes with lowercase letters and ends with corresponding uppercase letters to distinguish boundaries. - **Interactive Selection** — Prompts users to input labels and iteratively refines choices when labels are hidden by others. - **Overlap Resolution** — Intelligently handles cases where node positions overlap, ensuring the intended node can be selected. - **Customizable Highlighting** — Allows configuration of highlight groups like backdrop colors for better visual integration. - **Injection Support** — Can be configured to ignore or include language injections via Tree-sitter. ## Philosophy It approaches node selection like a monkey navigating an Abstract Syntax Tree—iteratively and adaptively—to provide a reliable and user-friendly experience without visual clutter.
Navigate between sibling nodes in your Neovim powered by Tree-sitter
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.