1. Introduction
  2. Editor Integration
  3. Common Configurations
  4. 1. Editor Frontends
    1. 1.1. VS Cod(e,ium)
    2. 1.2. Neovim
    3. 1.3. Emacs
    4. 1.4. Sublime Text
    5. 1.5. Helix
    6. 1.6. Zed
  5. Features
  6. 2. Command line interface
  7. 3. Code Documentation
  8. 4. Code Completion
  9. 5. Exporting Documents
  10. 6. Document Preview
  11. 7. Testing
  12. 8. Linting
  13. 9. Other Features
  14. Service Overview
  15. Overview of Service
  16. 10. Principles
  17. 11. Commands System
  18. 12. LSP Inputs
  19. 13. Type System
  20. Service Development
  21. 14. Crate Docs
  22. 15. LSP and CLI
  23. 16. Language Queries
  24. 17. Document Preview

Tinymist Docs

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.

#

Principles

Four principles are followed, as detailed in Principles.

  • Multiple Actors
  • Multi-level Analysis
  • Optional Non-LSP Features
  • Minimal Editor Frontends

#

Command System

The extra features are exposed via LSP's workspace/executeCommand request, forming a command system. They are detailed in Command System.

#

Additional Concepts for Typst Language

#

AST Matchers

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 or 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.

#

Type System

Check Type System for more details.

#

Notes on Implementing Language Features

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.