tree-sitter

Incremental parser generator and parsing library for building concrete syntax trees of source code.

Liked for syntax highlighting and queries in editors like Emacs and Neovim,123 for quickly building grammars and error-tolerant parsers for custom languages,456 and as the parsing layer for AST-based code analysis and agent tools.789 Complaints are scattered rather than shared: indentation-based languages are hard to support, some languages lack packaged parsers,1011 and structural editing has disappointed in most editors.12
The HN verdict, written from 12 cited comments
15recommend
3warn against
Nov 12, 2025first mention
Oct 12, 2026latest mention
Nov 25 – Oct 26
Used forfor Emacs usersfor language implementersfor code analysis toolsfor LLM agent toolingfor Neovim userssyntax highlightingparsing code

Why people recommend it

Code analysis tooling · 3

Used to parse codebases into ASTs for indexing, querying, semantic diffs and agent tools.

dknSep 26, 2026recommends

“building a small pipeline that reads the old code base, parses it file by file using tree sitter”

works in large, old codebaseson “One Month Without AI”

“extracts entities from 30+ languages via tree-sitter”

Show 1 more

“parses the repo code and docs with treesitter”

Grammar authoring · 3

Building grammars and parsers is described as fun and faster than hand-rolling a parser.

“If you haven't tried building a grammar with tree-sitter, I highly recommend you do so.”

“the overall DevEx is much quicker that hand-rolling the parser”

developing a custom programming languageon “Tree-sitter vs. Language Servers”
Show 1 more

“Actually with tree-sitter it's much less moving parts inside parser-generator core”

Editor highlighting · 3

Commenters prefer its syntax highlighting over classic approaches, especially in Emacs and Neovim.

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

“I love how easy it is to write Tree Sitter queries for very special patterns”

Show 1 more

“Emacs now with tree-sitter, LSPs, native-compilation, magit”

Easy queries · 2

Queries for special highlighting or formatting patterns are easy to write.

“I love how easy it is to write Tree Sitter queries for very special patterns”

“tree-sitter is much easier than it looks like”

Reusable grammars · 2

One grammar can serve an editor extension and an LSP written in different languages.

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

building an LSP for a niche DSL at workon “Tree-sitter vs. Language Servers”

“It’s really cool to see tree-sitter unlock so many of these use cases.”

Error tolerance · 1

Creates ERROR or MISSING nodes, making it usable as an error-tolerant compiler frontend.

“I just use it as an error-tolerant frontend to my compiler.”

Caveats and dissent

Indentation languages · 1

Getting it to handle indentation-based languages is described as a pain.

“it's a pain to get tree-sitter to handle it”

Missing parsers · 1

Some languages, such as R, YAML and Go, lacked packaged parsers for one user.

Structural editing · 1

One commenter found it has not delivered Lisp-level structural editing in most editors.

“while I used to have hope for tree-sitter to provide a similar level of structural editing for other languages, at least in most editors I've just not found that to be the case”

Grammar limits · 1

Lack of alternate roots forced one project to maintain a custom C grammar.

“We use the tree-sitter[1] for parsing C declarations in Rizin[2]”

Markdown errors · 1

One user hit constant Markdown errors that disabled highlighting and formatting.

“Whatever AI did to TreeSitter caused it to constantly yell at me about errors because of markdown”

CGO dependency · 1

Using it from Go requires CGO, which complicates Bazel Gazelle extensions.

“Oh this is really neat for the Bazel community”

Often compared with

Who recommends it in their own words

All comments 32

“parses the repo code and docs with treesitter”

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

dknSep 26, 2026recommends

“building a small pipeline that reads the old code base, parses it file by file using tree sitter”

works in large, old codebaseson “One Month Without AI”

“a tree-sitter based Vi/Vim compatible tags generator”

“tree-sitter support is better Rust so it seemed like a good fit.”

“I added tree-sitter, and a bunch of syntaxes highlighters.”

“it's a pain to get tree-sitter to handle it”

“Emacs now with tree-sitter, LSPs, native-compilation, magit”

“Whatever AI did to TreeSitter caused it to constantly yell at me about errors because of markdown”

“create an abstract syntax tree over the tree sitter trees for queries that work across language”

“use tree-sitter to statically check code to PRD”

“I also tried to use tree-sitter to enhance the user's prompt parser grammar”

“extracts entities from 30+ languages via tree-sitter”

“tree-sitter is much easier than it looks like”

“Actually with tree-sitter it's much less moving parts inside parser-generator core”

“How does this project compares to something like tree-sitter?”

“I used tree-sitter for coarse AST.”

works on a CRDT-based revision control system projecton “Show HN: I ported Tree-sitter to Go”

“Oh this is really neat for the Bazel community”

“I absolutely love the tree-sitter library, I use it in a number of projects.”

“I have been thinking about using tree-sitter for "context extraction / optimization" for code indexing”

“while I used to have hope for tree-sitter to provide a similar level of structural editing for other languages, at least in most editors I've just not found that to be the case”

“I love how easy it is to write Tree Sitter queries for very special patterns”

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

building an LSP for a niche DSL at workon “Tree-sitter vs. Language Servers”

“the overall DevEx is much quicker that hand-rolling the parser”

developing a custom programming languageon “Tree-sitter vs. Language Servers”

“eventually, if it works as it is supposed to, I plan to move to tree-sitter queries”

“If you haven't tried building a grammar with tree-sitter, I highly recommend you do so.”

“I just use it as an error-tolerant frontend to my compiler.”

“We use the tree-sitter[1] for parsing C declarations in Rizin[2]”

“It’s really cool to see tree-sitter unlock so many of these use cases.”

Threads where it came up

Also written as Tree-sitter. Data: tree-sitter.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.

Keyboard shortcuts
j / kNext / previous item
o or EnterOpen selected item
/Search
g hHome
g tTop
g rRising
g cCategories
tToggle dark mode
?This help