Neovim Treesitter API Reference

Document Neovim treesitter Lua API methods for syntax tree manipulation.

Updated Apr 26, 2026
One-click install
npx skills add https://github.com/farreeez/99 --skill neovim-treesitter-api-reference-farreeez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Neovim Treesitter API Reference
Source: https://github.com/farreeez/99/tree/main/.agents/skills/vim.treesitter
Command: npx skills add https://github.com/farreeez/99 --skill neovim-treesitter-api-reference-farreeez

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides detailed Lua API references for Neovim's treesitter integration, facilitating seamless syntax tree navigation and manipulation.

Core Features & Use Cases

  • API Reference: Offers type stubs and method descriptions for treesitter nodes, trees, queries, and miscellaneous types.
  • Use Case: Enables developers to understand and utilize treesitter's Lua API for advanced syntax highlighting and code analysis in Neovim.
  • Implementation Support: Assists in scripting complex editor behaviors through precise API knowledge.

Quick Start

Use the treesitter API reference to look up methods for querying and navigating syntax nodes in a Lua script.

Frequently Asked Questions about Neovim Treesitter API Reference

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

FAQPage Schema
How do I use the treesitter Lua API to query and navigate syntax nodes in Neovim?

To use the treesitter Lua API, reference the provided method descriptions for trees, nodes, and queries to script syntax tree navigation and manipulation in Neovim. It supplies detailed Lua API references for seamless code parsing.

What is the treesitter Lua API used for in Neovim plugin development?

The treesitter Lua API is used for advanced syntax highlighting and code analysis in Neovim. It enables developers to script complex editor behaviors by facilitating precise syntax tree navigation and manipulation during plugin development.

Can I look up method descriptions for treesitter nodes and queries in this API reference?

Yes, you can look up method descriptions for treesitter nodes, trees, queries, and miscellaneous types. The reference offers type stubs to support developers in scripting syntax tree analysis and manipulation tasks effectively.

Do I need prior knowledge of treesitter methods to implement custom syntax highlighting?

Yes, implementing custom syntax highlighting requires existing knowledge of treesitter Lua API methods. This reference supplies the detailed Lua API documentation needed to understand and utilize these methods for code analysis.

How does treesitter parsing work for scripting complex editor behaviors in Neovim?

Treesitter parsing works by generating a syntax tree that you query and navigate via the Lua API. This allows developers to script complex editor behaviors by analyzing and manipulating the structural syntax tree of the code.