Execution vs. Parse-Based Language Servers
summary
A parse-based language server captures structural info during parsing to provide go-to definition, find references, outline view, hover without executing user code, achieving much IDE functionality with under 1,000 lines of glue code (examples: Newspeak, SOM, SimpleLanguage) and parsing 10k-line files in ~100 ms. Compared to Truffle’s execution-based approach (10–20 AST tag lines but requires running code) it trades some precision on globals, properties and runtime-ranked completions while otherwise working well.
AI-written summary · about
chapters (21)
- 0:00Language server challenges
- 1:07Protocol duplication issues
- 3:10Truffle framework IDE support
- 4:15Language-agnostic server design
- 5:38Structural info during parsing
- 7:24Element IDs and lookup
- 9:11API design and effort reduction
- 9:32IDE features enabled
- 11:39Lines of code comparison for language servers
- 12:40ANTLR parser benefits
- 13:44Incremental parsing needs
- 14:27Worst-case parsing metrics
- 15:11Truffle alternative approach
- 16:35Execution-based limitations
- 18:18Execution vs parse-based
- 20:02Minimal IDE support
- 20:44Q&A pretty printing
- 23:57Q&A semantic highlighting
- 25:23Q&A plugin requirements
- 26:05Q&A AI-assisted generation
- 26:47Q&A AST design
related talks
31mGraal-LSP: A Language Server Implementation with Polyglot Support for the GraalVM
40mIntegrating IDEs with Dotty the experimental Scala compiler
30mImproving the development experience with language servers
27mParsing, Compiling, and Static Metaprogramming
44mDeveloping a Language Plugin: LSP versus the Joy of Learning
12mSlang Language Server: Accelerated, Reliable SystemVerilog Development
39mCursorless: A spoken language for editing code
29mMy Little Parser: Tooling is Magic
