Neovim Treesitter API Reference

This document contains type stubs and API references for Neovim's treesitter Lua API.

4,466 stars

Best use case

Neovim Treesitter API Reference is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

This document contains type stubs and API references for Neovim's treesitter Lua API.

Teams using Neovim Treesitter API Reference should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/vim.treesitter/SKILL.md --create-dirs "https://raw.githubusercontent.com/ThePrimeagen/99/main/.agents/skills/vim.treesitter/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/vim.treesitter/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How Neovim Treesitter API Reference Compares

Feature / AgentNeovim Treesitter API ReferenceStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

This document contains type stubs and API references for Neovim's treesitter Lua API.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

Related Guides

SKILL.md Source

# Neovim Treesitter API Reference

This document contains type stubs and API references for Neovim's treesitter Lua API.
Use this as a reference when working with treesitter in Neovim Lua.

---

## tsnode

TSNode methods - represents a specific element in a parsed syntax tree. Use these methods to navigate and inspect nodes.

```lua
function TSNode:parent() end
function TSNode:next_sibling() end
function TSNode:prev_sibling() end
function TSNode:next_named_sibling() end
function TSNode:prev_named_sibling() end
function TSNode:iter_children() end
function TSNode:field(name) end
function TSNode:child_count() end
function TSNode:child(index) end
function TSNode:named_child_count() end
function TSNode:named_children() end
function TSNode:__has_ancestor(node_types) end
function TSNode:named_child(index) end
function TSNode:child_with_descendant(descendant) end
function TSNode:start() end
function TSNode:end_() end
function TSNode:range(include_bytes) end
function TSNode:type() end
function TSNode:symbol() end
function TSNode:named() end
function TSNode:missing() end
function TSNode:extra() end
function TSNode:has_changes() end
function TSNode:has_error() end
function TSNode:sexpr() end
function TSNode:id() end
function TSNode:tree() end
function TSNode:descendant_for_range(start_row, start_col, end_row, end_col) end
function TSNode:named_descendant_for_range(start_row, start_col, end_row, end_col) end
function TSNode:equal(node) end
function TSNode:byte_length() end
```

---

## tstree

TSTree methods - represents the parsed contents of a buffer.

```lua
function TSTree:root() end
function TSTree:edit(start_byte, end_byte_old, end_byte_new, start_row, start_col, end_row_old, end_col_old, end_row_new, end_col_new) end
function TSTree:copy() end
function TSTree:included_ranges(include_bytes) end
function TSTree:included_ranges(include_bytes) end
```

---

## tsquery

TSQuery methods - for working with treesitter queries.

```lua
function TSQuery:inspect() end
function TSQuery:disable_capture(capture_name) end
function TSQuery:disable_pattern(pattern_index) end
```

---

## misc

Various treesitter types including TSParser, TSQueryMatch, TSQueryCursor, and TSLangInfo.

```lua
vim._ts_inspect_language = function(lang) end
vim._ts_get_language_version = function() end
vim._ts_add_language_from_object = function(path, lang, symbol_name) end
vim._ts_add_language_from_wasm = function(path, lang) end
vim._ts_get_minimum_language_version = function() end
vim._ts_parse_query = function(lang, query) end
vim._create_ts_parser = function(lang) end
function TSQueryMatch:info() end
function TSQueryCursor:next_capture() end
function TSQueryCursor:next_match() end
function vim._create_ts_querycursor(node, query, start, stop, opts) end
```

Related Skills

Neovim LSP API Reference

4466
from ThePrimeagen/99

This document contains function definitions from Neovim's LSP help docs.

Neovim Diagnostics API Reference

4466
from ThePrimeagen/99

This document contains function definitions for Neovim's diagnostics Lua API.

foo

4466
from ThePrimeagen/99

No description provided.

makepad-reference

31392
from sickn33/antigravity-awesome-skills

This category provides reference materials for debugging, code quality, and advanced layout patterns.

Programming HelperClaude

reference-builder

31392
from sickn33/antigravity-awesome-skills

Creates exhaustive technical references and API documentation. Generates comprehensive parameter listings, configuration guides, and searchable reference materials.

microsoft-code-reference

28865
from github/awesome-copilot

Look up Microsoft API references, find working code samples, and verify SDK code is correct. Use when working with Azure SDKs, .NET libraries, or Microsoft APIs—to find the right method, check parameters, get working examples, or troubleshoot errors. Catches hallucinated methods, wrong signatures, and deprecated patterns by querying official docs.

Top 100 Web Vulnerabilities Reference

24269
from davila7/claude-code-templates

This skill should be used when the user asks to "identify web application vulnerabilities", "explain common security flaws", "understand vulnerability categories", "learn about injection attacks", "review access control weaknesses", "analyze API security issues", "assess security misconfigurations", "understand client-side vulnerabilities", "examine mobile and IoT security flaws", or "reference the OWASP-aligned vulnerability taxonomy". Use this skill to provide comprehensive vulnerability definitions, root causes, impacts, and mitigation strategies across all major web security categories.

omc-reference

22262
from Yeachan-Heo/oh-my-claudecode

OMC agent catalog, available tools, team pipeline routing, commit protocol, and skills registry. Auto-loads when delegating to agents, using OMC tools, orchestrating teams, making commits, or invoking skills.

paper-reference-checker

3891
from openclaw/skills

This skill should be used when the user asks to "check paper citations", "verify references", "detect fake citations", "validate bibliography", "check if papers exist", "查文献真伪", "检查论文引用", "验证参考文献", "识别虚假引用", or uploads a PDF/Overleaf document and wants to verify whether the cited papers genuinely exist. Provides systematic verification of academic references against Google Scholar, CNKI, arXiv, and other academic databases to detect AI-hallucinated or fabricated citations.

reference-style-sync

3891
from openclaw/skills

One-click synchronization and standardization of reference formats in literature management tools, intelligently fixing metadata errors.

VB.NET CODING AGENT SKILL REFERENCE

3891
from openclaw/skills

**Target**: Claude-Code, Codex, AI coding agents

figure-reference-checker

3891
from openclaw/skills

Check figure references in manuscripts