AI SummaryThis is a Rust+JavaScript repository. It builds: It is primarily responsible for providing integrated typst language service to various editors like VS Code, Neovim, Emacs, and Zed. Please follow these guidelines when contributing: Determine a good PR prefix only by the PR description before work. A
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "tinymist — Copilot Instructions" prompt rules to my project. Repository: https://github.com/Myriad-Dreamin/tinymist Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
Tinymist [ˈtaɪni mɪst] is an integrated language service for Typst [taɪpst].
`tools/editor-tools`
The frontend-side and backend-side can be developed independently. For example, a data object passed from backend to frontend can be coded as van.state<T> as follows: • Intermediate arguments: `ts const documentMetricsData = :[[preview:DocumentMetrics]]:; const docMetrics = van.state<DocumentMetrics>( documentMetricsData.startsWith(":") ? DOC_MOCK : JSON.parse(base64Decode(documentMetricsData)), ); ` • Server-pushing arguments (e.g. programTrace in tools/editor-tools/src/vscode.ts): `ts export const programTrace = van.state<TraceReport | undefined>(undefined / init value /); export function setupVscodeChannel() { if (vscodeAPI?.postMessage) { // Handle messages sent from the extension to the webview window.addEventListener("message", (event: any) => { switch (event.data.type) { case "traceData": { programTrace.val = event.data.data; break; } // other cases } }); } } ` • Tool request arguments (e.g. requestSaveFontsExportConfigure in tools/editor-tools/src/vscode.ts): `ts export function requestSaveFontsExportConfigure(data: fontsExportConfigure) { if (vscodeAPI?.postMessage) { vscodeAPI.postMessage({ type: "saveFontsExportConfigure", data }); } } ` DOC_MOCK is a mock data object for the frontend to display so that the frontend can be developed directly with yarn dev.
Specialized Instructions
• Localization: See copilot-instructions-l10n.md for comprehensive guidance on adding, updating, and maintaining localization in the project.
Keep Good PR Title
Determine a good PR prefix only by the PR description before work. Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/ Available types: • dev • feat • fix • docs • style • refactor • perf • test • build • ci • chore • revert
Required Before Each Commit
• Run yarn fmt to format Rust/JavaScript files • This will run formatters on all necessary files to maintain consistent style
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts