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

The extra features are exposed via LSP's workspace/executeCommand request, forming a command system. The commands in the system share a name convention.

  • exportFmt. these commands perform export on some document, with a specific format (Fmt), e.g. exportPdf.

  • interactCodeContext({kind}[]). The code context requests are useful for Editor Frontends to extend some semantic actions. A batch of requests are sent at the same time, to get code context atomically.

  • getResources("path/to/resource/", opts). The resources required by Editor Frontends should be arranged in paths. A second arguments can be passed as options to request a resource. This resemebles a restful POST action to LSP, with a url path and a HTTP body, or a RPC with a method name and params.

    Note you can also hide some commands in list of commands in UI by putting them in getResources command.

  • doXxx. these commands are internally for Editor Frontends, and you'd better not to invoke them directly. You can still invoke them manually, as long as you know what would happen.

  • The rest commands are public and tend to be user-friendly.

#

Code Context

The code context requests are useful for Editor Frontends to check syntax and semantic the multiple positions. For example an editor frontend can filter some completion list by acquire the code context at current position.