[PR #5933] feat(lsp): add Tinymist LSP support for Typst #11654

Closed
opened 2026-02-16 18:16:33 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/5933

State: closed
Merged: Yes


Summary

  • Add Tinymist LSP support for Typst files (.typ, .typc)

Closes #5932

Implementation Details

Aspect Decision
File extensions .typ, .typc
Project detection typst.toml (standard Typst project file)
Installation Auto-download from GitHub releases
Platforms macOS, Linux, Windows (x64 and arm64)
LSP command tinymist (no arguments needed)
Initialization options None (Tinymist works well with defaults)

Why these decisions?

  1. GitHub releases over cargo install - Follows existing patterns (texlab, zls, terraform-ls). Cargo compilation is slow and requires the Rust toolchain.

  2. --strip-components=1 for tar extraction - Tinymist archives contain a subdirectory wrapper (e.g., tinymist-x86_64-apple-darwin/tinymist), unlike texlab which extracts directly to root.

  3. No initialization options - Consistent with similar LSPs (texlab, zls, gleam). Tinymist's defaults work well; users can customize via opencode.json if needed.

  4. typst.toml for root detection - Standard Typst project configuration file.

Files Changed

  • packages/opencode/src/lsp/language.ts - Add .typ and .typc extensions
  • packages/opencode/src/lsp/server.ts - Add Tinymist LSP server
  • packages/web/src/content/docs/lsp.mdx - Update documentation
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/5933 **State:** closed **Merged:** Yes --- ## Summary - Add Tinymist LSP support for Typst files (`.typ`, `.typc`) Closes #5932 ## Implementation Details | Aspect | Decision | |--------|----------| | **File extensions** | `.typ`, `.typc` | | **Project detection** | `typst.toml` (standard Typst project file) | | **Installation** | Auto-download from GitHub releases | | **Platforms** | macOS, Linux, Windows (x64 and arm64) | | **LSP command** | `tinymist` (no arguments needed) | | **Initialization options** | None (Tinymist works well with defaults) | ### Why these decisions? 1. **GitHub releases over cargo install** - Follows existing patterns (texlab, zls, terraform-ls). Cargo compilation is slow and requires the Rust toolchain. 2. **`--strip-components=1` for tar extraction** - Tinymist archives contain a subdirectory wrapper (e.g., `tinymist-x86_64-apple-darwin/tinymist`), unlike texlab which extracts directly to root. 3. **No initialization options** - Consistent with similar LSPs (texlab, zls, gleam). Tinymist's defaults work well; users can customize via `opencode.json` if needed. 4. **`typst.toml` for root detection** - Standard Typst project configuration file. ## Files Changed - `packages/opencode/src/lsp/language.ts` - Add `.typ` and `.typc` extensions - `packages/opencode/src/lsp/server.ts` - Add Tinymist LSP server - `packages/web/src/content/docs/lsp.mdx` - Update documentation
yindo added the pull-request label 2026-02-16 18:16:33 -05:00
yindo closed this issue 2026-02-16 18:16:33 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11654