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

#

Base Analyses

There are seven basic analyzers:

  • lexical hierarchy matches crucial lexical structures in the source file.
  • expression info is computed incrementally on source files.
  • type check info is computed with expression info.
  • definition finder finds the definition based on expression info and type check info.
  • references finder finds the references based on definitions and expression info.
  • signature resolver summarizes signature based on definitions and type check info.
  • call resolver check calls based on signatures and type check info.
FigureĀ 1: The relationship of analyzers.

#

Extending Language Features

Typicial language features are implemented based on basic analyzers:

  • The textDocument/documentSymbol returns a tree of nodes converted from the lexical hierarchy.

  • The textDocument/foldingRange also returns a tree of nodes converted from the lexical hierarchy but with a different approach.

  • The workspace/symbol returns an array of nodes converted from all lexical hierarchys in workspace.

  • The textDocument/definition returns the result of find definition.

  • The textDocument/completion returns a list of types of related nodes according to type check info, matched by AST matchers.

  • The textDocument/hover finds definition and prints the definition with a checked type by type check info. Or, specific to typst, prints a set of inspected values during execution of the document.

  • The textDocument/signatureHelp also finds definition and prints the signature with union of inferred signatures by type check info.

  • The textDocument/prepareRename finds definition and determines whether it can be renamed.

  • The textDocument/rename finds definition and references and renamed them all.

#

Contributing

See CONTRIBUTING.md.