nvim-treesitter-textobjects

Configure Treesitter-based text objects for semantic code selection in Neovim.

1|Updated Oct 26, 2025
One-click install
npx skills add https://github.com/NeKon69/nvim-dot --skill nvim-treesitter-textobjects
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nvim-treesitter-textobjects
Source: https://github.com/NeKon69/nvim-dot/tree/main/.agents/skills/nvim-treesitter-textobjects
Command: npx skills add https://github.com/NeKon69/nvim-dot --skill nvim-treesitter-textobjects

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers navigate and manipulate code more efficiently by leveraging Neovim's Treesitter integration to define and interact with semantic code structures (text objects).

Core Features & Use Cases

  • Advanced Text Selection: Select code blocks based on their semantic meaning (e.g., function arguments, entire functions, code blocks within braces) rather than just character or line ranges.
  • Efficient Editing: Quickly delete, copy, or modify specific code structures.
  • Use Case: When editing a function, you can select the entire function body with a single command, making it easy to refactor or move.

Quick Start

Use the nvim-treesitter-textobjects skill to set up text object navigation in Neovim.

Frequently Asked Questions about nvim-treesitter-textobjects

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I select an entire function body in Neovim using semantic code structures?

You can select an entire function body in Neovim by using semantic text objects. This integration with Treesitter enables code selection based on structural meaning rather than simple character or line ranges, allowing you to target entire functions with a single command.

What are text objects in Neovim and how do they improve code editing workflows?

Text objects in Neovim are semantic code structures defined by the Treesitter parser. They improve code editing by allowing you to quickly select, delete, copy, or modify specific code blocks like function arguments and bodies based on their actual meaning within the syntax tree.

Do I need the nvim-treesitter plugin installed to use text objects for code navigation?

Yes, you need the nvim-treesitter plugin installed and configured to use these text objects. The functionality relies entirely on integrating with the Treesitter parser to enable advanced semantic code selection and manipulation capabilities in Neovim.

Can I quickly refactor or move function arguments in Neovim without manual highlighting?

Yes, you can efficiently refactor or move function arguments without manual highlighting. By leveraging Treesitter text objects, you can target specific semantic structures like function arguments directly, making it easy to delete, copy, or modify them.

What is the best way to navigate and manipulate code blocks within braces in Neovim?

The best way to navigate and manipulate code blocks within braces in Neovim is by using Treesitter-based text objects. This approach allows you to interact with the code blocks based on their semantic meaning, enabling precise and efficient structural editing.

Why does Treesitter text object selection fail if the parser is not configured in Neovim?

Treesitter text object selection fails without a configured parser because the feature depends on the nvim-treesitter plugin to analyze and understand the semantic code structures. Without this underlying parsing mechanism, Neovim cannot identify the structural text objects required for selection.