Hacker ApprovedDepartments

Tree-sitter

Hacker Approved

The most recommended of 7 parser libraries

Recommended as a fast, incremental parser with real syntax trees and broad language support. Critics say it is limited next to an IDE and less complete than hand-written parsers.

Recommended as a fast, incremental parser with real syntax trees and broad language support. Critics say it is limited next to an IDE and less complete than hand-written parsers.

94 people gave an opinion

recommend it
79
criticize it
15
approval share
84%
Each figure is one person. RecommendsCriticizes

Recommended in 12 of 13 months

  1. November 2025: recommended
  2. December 2025: recommended
  3. January 2026: recommended
  4. February 2026: recommended
  5. March 2026: recommended
  6. April 2026: recommended
  7. May 2026: recommended
  8. June 2026: recommended
  9. July 2026: recommended
  10. August 2026: recommended
  11. September 2026: recommended
  12. October 2026: recommended
  13. November 2026: not recommended (month in progress)

Why it carries the badge

  • 79 people recommend itNeeds 10 or more, met.
  • 5.3 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 12 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Gives AI agents code structure

    “Treesitter supports query by symbol (find definition, usages, etc), and so is much better suited to what an AI agent may want to do.”

    Comment from 12 Feb 2026 in “Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents”

    “tree-sitter lets you grab full functions or classes. It seems to give much better context quality and keeps token costs down”

    Comment from 23 Jan 2026 in “Tree-sitter vs. Language Servers”

    “more advanced code agent methods like Tree Sitter, PageRank, LSP, that build semantic maps to provide more relevant context”

    Comment from 10 Jun 2026 in “Is Grep All You Need? How Agent Harnesses Reshape Agentic Search”
  • Fast incremental parsing for editors

    “Tree-sitter parses on the main thread (or a close worker) typically in sub-ms timeframes, ensuring that syntax coloring is synchronous with keystrokes.”

    Comment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

    “in the recent versions of vscode, they started supporting tree-sitter, which is quite nice in terms of performance”

    Comment from 19 Jan 2026 in “Show HN: 1Code – open-source Cursor-like UI for Claude Code”

    “Tree-sitter is more performant for sure, and its potential for easier text objects is nice.”

    Comment from 27 Sep 2026 in “On caring for user data: NeoVim caused Vim undo files to be deleted”
  • Wide language support via grammars

    “As its ecosystem is an absolute beast when it comes to the amount of languages it supports this would definetly be my preferred method”

    Comment from 11 Feb 2026 in “Show HN: A Satellite View for Python Code”

    “The value of tree-sitter came from the fact that grammars compile to a .so and can be easily distributed through package managers.”

    Comment from 26 Jul 2026 in “How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster”

    “Kinda nice that the same tree-sitter grammar can be used across the extension and LSP”

    Comment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”
  • Real parse trees instead of regex

    “it gives you the actual parse tree so you don't have to keep patching regex patterns for every new language construct”

    Comment from 6 Jun 2026 in “Sem: New primitive for code understanding – not LSPs, but entities on top of Git”

    “it's far more reliable to use proper parsers instead of a bunch of regular expressions”

    Comment from 7 Mar 2026 in “Helix: A post-modern text editor”

    “They at least give a more structured approach to dealing with code than simple text.”

    Comment from 13 Jul 2026 in “Ask HN: What Are You Working On? (July 2026)”

What people warn about

Each mark is one comment

  • Favors speed over completeness

    “Tree-sitter's trade-off (speed + incrementality over completeness) makes sense for editors but you're right that for merge/diff a more thorough parser could be worth the cost”

    Comment from 4 Mar 2026 in “Weave – A language aware merge algorithm based on entities”

    “TreeSitter is an amazing tool but is (purposefully) quite limited compared to an IDE”

    Comment from 29 Apr 2026 in “Zed is 1.0”
  • Hard grammar authoring and poor docs

    “I remember having to dig through the release histories of each of the poorly documented ABI version for each language”

    Comment from 25 Aug 2026 in “What's new in Emacs 31.1”

    “I’ve had the Tree-sitter compiler “shit itself” many times at grammars that PEG accepted with no problem”

    Comment from 3 Jun 2026 in “Why Janet?”

    “just is too convoluted and requires the added C/C++ overhead to understand how to use it”

    Comment from 5 Oct 2026 in “Plain text is still one of the best technologies we have”
  • Error recovery breaks on complex code

    “C/C++ with macros and preprocessor directives is where tree-sitter's error recovery gets stretched.”

    Comment from 4 Mar 2026 in “Weave – A language aware merge algorithm based on entities”

    “error recovery is so aggressive it will accept broken ASTs without marking any node as an error”

    Comment from 15 Dec 2025 in “Arborium: Tree-sitter code highlighting with Native and WASM targets”
  • Speed gains often overstated

    “treesitter in itself doesn't really make much of an improvement if you already have working syntax highlighting”

    Comment from 18 Jun 2026 in “Emacs 31 Is Around the Corner: The Changes I'm Daily Driving”

    “The speed claims turned out to be largely overstated in practice, for the general variety of usage”

    Comment from 17 Apr 2026 in “A Better R Programming Experience Thanks to Tree-sitter”

Other parser libraries people recommend

The four most recommended other parser libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

Tree-sitter compared with 4 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
Tree-sitterThis page791584%12—Approved
Hardwood Parquet parser70100%2——
Lark parser library for Python6186%5——
Kaitai Struct6275%5——
Ohm parsing library6367%2——
See all 7 parser libraries, ranked

What people said

40 of the 104 comments that mention it, newest first. Each links to the original comment.

“just is too convoluted and requires the added C/C++ overhead to understand how to use it”

CriticizesComment from 5 Oct 2026 in “Plain text is still one of the best technologies we have”

“Tree-sitter is more performant for sure, and its potential for easier text objects is nice.”

MixedComment from 27 Sep 2026 in “On caring for user data: NeoVim caused Vim undo files to be deleted”

“treesitter runs circles around what classic vim is using to highlight syntax”

RecommendsComment from 27 Sep 2026 in “On caring for user data: NeoVim caused Vim undo files to be deleted”

“I remember having to dig through the release histories of each of the poorly documented ABI version for each language”

CriticizesComment from 25 Aug 2026 in “What's new in Emacs 31.1”

“The value of tree-sitter came from the fact that grammars compile to a .so and can be easily distributed through package managers.”

RecommendsComment from 26 Jul 2026 in “How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster”

“Implementing incremental parsing improved performance from 5ms to 400us for small edits”

RecommendsComment from 26 Jul 2026 in “How AST-grep Rewrote Tree-sitter in Rust and Made It 30% Faster”

“They at least give a more structured approach to dealing with code than simple text.”

RecommendsComment from 13 Jul 2026 in “Ask HN: What Are You Working On? (July 2026)”

“treesitter in itself doesn't really make much of an improvement if you already have working syntax highlighting”

MixedComment from 18 Jun 2026 in “Emacs 31 Is Around the Corner: The Changes I'm Daily Driving”

“more advanced code agent methods like Tree Sitter, PageRank, LSP, that build semantic maps to provide more relevant context”

RecommendsComment from 10 Jun 2026 in “Is Grep All You Need? How Agent Harnesses Reshape Agentic Search”

“it gives you the actual parse tree so you don't have to keep patching regex patterns for every new language construct”

RecommendsComment from 6 Jun 2026 in “Sem: New primitive for code understanding – not LSPs, but entities on top of Git”

“I’ve had the Tree-sitter compiler “shit itself” many times at grammars that PEG accepted with no problem”

CriticizesComment from 3 Jun 2026 in “Why Janet?”

“Migrated from regex-based bash static analysis to tree-sitter, reducing false positive permission prompts by 45%”

RecommendsComment from 28 May 2026 in “Dynamic Workflows in Claude Code”

“TreeSitter is an amazing tool but is (purposefully) quite limited compared to an IDE”

MixedComment from 29 Apr 2026 in “Zed is 1.0”

“The speed claims turned out to be largely overstated in practice, for the general variety of usage”

CriticizesComment from 17 Apr 2026 in “A Better R Programming Experience Thanks to Tree-sitter”

“Tree-sitter is a partial solution to the n×m problem, and now R has been invited to participate in that solution.”

RecommendsComment from 17 Apr 2026 in “A Better R Programming Experience Thanks to Tree-sitter”

“tree-sitter integrates into any web-based technology, allowing you to _share_ code.”

RecommendsComment from 17 Apr 2026 in “A Better R Programming Experience Thanks to Tree-sitter”

“Tools like tree-sitter help identify which files are actually referenced.”

RecommendsComment from 18 Mar 2026 in “Ask HN: Burning $100K/week on LLM tokens – what are you doing to cut costs?”

“My worry is that stability of committed ASTs would depend on tree-sitter being stable”

MixedComment from 9 Mar 2026 in “Beagle, a source code management system that stores AST trees”

“uses tree-sitter to dump exported functions, public types, and a lightweight dependency graph”

RecommendsComment from 7 Mar 2026 in “Show HN: Brf.it – Extracting code interfaces for LLM context”

“it's far more reliable to use proper parsers instead of a bunch of regular expressions”

RecommendsComment from 7 Mar 2026 in “Helix: A post-modern text editor”

“Tree-sitter's trade-off (speed + incrementality over completeness) makes sense for editors but you're right that for merge/diff a more thorough parser could be worth the cost”

MixedComment from 4 Mar 2026 in “Weave – A language aware merge algorithm based on entities”

“C/C++ with macros and preprocessor directives is where tree-sitter's error recovery gets stretched.”

CriticizesComment from 4 Mar 2026 in “Weave – A language aware merge algorithm based on entities”

“When I saw "tree-sitter in go" title, I was very glad at first. Then I saw the full picture.”

MixedComment from 25 Feb 2026 in “Show HN: I ported Tree-sitter to Go”

“TreeSitter will also give you locations of symbol usages, which is obviously very useful to an AI agent.”

RecommendsComment from 12 Feb 2026 in “Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents”

“Treesitter supports query by symbol (find definition, usages, etc), and so is much better suited to what an AI agent may want to do.”

RecommendsComment from 12 Feb 2026 in “Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents”

“Tree-sitter handles structural queries giving the LLM the ability to evaluate function signatures, hierarchies and such.”

RecommendsComment from 12 Feb 2026 in “Show HN: CodeRLM – Tree-sitter-backed code indexing for LLM agents”

“As its ecosystem is an absolute beast when it comes to the amount of languages it supports this would definetly be my preferred method”

RecommendsComment from 11 Feb 2026 in “Show HN: A Satellite View for Python Code”

“tree-sitter lets you grab full functions or classes. It seems to give much better context quality and keeps token costs down”

RecommendsComment from 23 Jan 2026 in “Tree-sitter vs. Language Servers”

“Kinda nice that the same tree-sitter grammar can be used across the extension and LSP”

RecommendsComment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

“Tree-sitter is also a parser generator but has better error tolerance properties (not quite as good as hand-written but generally better than prior implementations)”

MixedComment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

“its flexible query language makes it a winner for people to quickly iterate on a working parser”

RecommendsComment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

“Tree-sitter parses on the main thread (or a close worker) typically in sub-ms timeframes, ensuring that syntax coloring is synchronous with keystrokes.”

RecommendsComment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

“the TS approach is so simple and so good that I'll probably never use anything else”

RecommendsComment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

“I love tree-sitter+eglot but a few of the languages/schemes I work in, simply don't have parsers”

MixedComment from 22 Jan 2026 in “Tree-sitter vs. Language Servers”

“in the recent versions of vscode, they started supporting tree-sitter, which is quite nice in terms of performance”

RecommendsComment from 19 Jan 2026 in “Show HN: 1Code – open-source Cursor-like UI for Claude Code”

“TreeSitter (but TreeSitter) that knows where identifiers (variables, functions) are defined and used.”

RecommendsComment from 16 Jan 2026 in “Ask HN: How are you doing RAG locally?”

“error recovery is so aggressive it will accept broken ASTs without marking any node as an error”

CriticizesComment from 15 Dec 2025 in “Arborium: Tree-sitter code highlighting with Native and WASM targets”

“The custom grammar was sadly necessary, due to the inability of Tree-Sitter to have the alternate roots”

MixedComment from 8 Dec 2025 in “Show HN: Cdecl-dump - represent C declarations visually”

“I use tree-sitter, LSPs, copilot.el, copilot-chat.el, and others all day, every day”

RecommendsComment from 16 Nov 2025 in “IDEmacs: A Visual Studio Code clone for Emacs”

“all see the potential of semantic changes and of Tree-sitter as a platform for making them”

RecommendsComment from 14 Nov 2025 in “Mergiraf: Syntax-Aware Merging for Git”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.