Incremental Parsing with emacs-tree-sitter
summary
Emacs integration embeds the C tree-sitter library via a dynamic module and three packages: TSC core, tree-sitter main mode and a precompiled tree-sitter-langs bundle for three platforms; parsers can also compile to WebAssembly for web use. Incremental parsing updates the syntax tree in real time, with initial parse tens of milliseconds and incremental reparses sub-millisecond. Syntax highlighting, string interpolation, decorators, function names and property accessors are detected and highlighted correctly.
AI-written summary · about
chapters (20)
- 0:00Introduction
- 0:23Problem with regex parsing
- 1:49Language-specific parsers
- 3:14Language server protocol issues
- 4:17Tree-sitter introduction
- 5:22Why Tree-sitter is fast
- 6:04Tree-sitter’s uniform API
- 6:50Emacs integration progress
- 7:55Tree-sitter modes demo
- 9:35Syntax highlighting with queries
- 10:59Core data structures overview
- 12:28Named vs anonymous nodes
- 14:04Query language basics
- 15:30Highlighting function names
- 16:40Distinguishing string types
- 19:27Project-specific highlighting
- 21:55Language bundle package
- 22:39Community contribution areas
- 23:44Integrating Tree-sitter
- 25:12Q&A
related talks
14mFast Incremental PEG Parsing
29mMy Little Parser: Tooling is Magic
42mFrom Linear to Incremental
20mAn Approach to Generate Text-Based IDEs for Syntax Correction based on Syntax Specification
36mMythical trees and where to find them
25mHigh-Fidelity Metaprogramming with Separator Syntax Trees
01h 18mExpressive Compile-Time Parsers in C++
22mImproving Swift Tools with libSyntax
