Overview of Service
This document gives an overview of tinymist service, which provides a single integrated language service for Typst. This document doesn't dive in details unless necessary.
Four principles are followed, as detailed in Principles.
- Multiple Actors
- Multi-level Analysis
- Optional Non-LSP Features
- Minimal Editor Frontends
The extra features are exposed via LSP's workspace/executeCommand
workspace/executeCommand
request, forming a command system. They are detailed in Command System.
Many analyzers don't check AST node relationships directly. The AST matchers provide some indirect structure for analyzers.
- Most code checks the syntax object matched by
get_deref_target
get_deref_target
orget_check_target
get_check_target
. - The folding range analyzer and def-use analyzer check the source file on the structure named lexical hierarchy.
- The type checker checks constraint collected by a trivial node-to-type converter.
Check Type System for more details.
Five basic analysis like lexical hierarchy, def use info and type check info are implemented first. And all rest Language features are implemented based on basic analysis. Check Analyses for more details.