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
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
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.