Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Myriad-Dreamin/tinymist
Tinymist [ˈtaɪni mɪst] is an integrated language service for Typst [taɪpst].
https://github.com/Myriad-Dreamin/tinymist
formatter lsp lsp-server typst vscode-extension
Last synced: 3 months ago
JSON representation
Tinymist [ˈtaɪni mɪst] is an integrated language service for Typst [taɪpst].
- Host: GitHub
- URL: https://github.com/Myriad-Dreamin/tinymist
- Owner: Myriad-Dreamin
- License: apache-2.0
- Created: 2024-03-06T21:30:21.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-29T08:38:25.000Z (3 months ago)
- Last Synced: 2024-10-29T09:54:47.655Z (3 months ago)
- Topics: formatter, lsp, lsp-server, typst, vscode-extension
- Language: Rust
- Homepage: https://myriad-dreamin.github.io/tinymist
- Size: 3.54 MB
- Stars: 714
- Watchers: 6
- Forks: 30
- Open Issues: 44
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-typst - Tinymist - A language server for typst with integrations for Emacs, Helix, NeoVim, Sublime Text, VsCode/VsCodium, and Zed (Integrations & Tools / Editor Integrations)
README
# Tinymist
Tinymist [ˈtaɪni mɪst] is an integrated language service for [Typst](https://typst.app/) [taɪpst]. You can also call it "微霭" [wēi ǎi] in Chinese.
It contains:
- an analyzing library for Typst, see [tinymist-query](https://github.com/Myriad-Dreamin/tinymist/tree/main/crates/tinymist-query).
- a CLI for Typst, see [tinymist](https://github.com/Myriad-Dreamin/tinymist/tree/main/crates/tinymist/).
- which provides a language server for Typst, see [Language Features](https://myriad-dreamin.github.io/tinymist//feature/language.html).
- which provides a preview server for Typst, see [Preview Feature](https://myriad-dreamin.github.io/tinymist//feature/preview.html).
- a VSCode extension for Typst, see [Tinymist VSCode Extension](https://github.com/Myriad-Dreamin/tinymist/tree/main/editors/vscode/).## Features
Language service (LSP) features:
- [Semantic highlighting](https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide)
- The "semantic highlighting" is supplementary to ["syntax highlighting"](https://code.visualstudio.com/api/language-extensions/syntax-highlight-guide).- [Code actions](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#provide-code-actions)
- Also known as "quick fixes" or "refactorings".
- [Formatting (Reformatting)](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#format-source-code-in-an-editor)
- Provide the user with support for formatting whole documents, using [typstfmt](https://github.com/astrale-sharp/typstfmt) or [typstyle](https://github.com/Enter-tainer/typstyle).
- [Document highlight](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#highlight-all-occurrences-of-a-symbol-in-a-document)
- Highlight all break points in a loop context.
- (Todo) Highlight all exit points in a function context.
- (Todo) Highlight all captures in a closure context.
- (Todo) Highlight all occurrences of a symbol in a document.
- [Document links](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_documentLink)
- Renders path or link references in the document, such as `image("path.png")` or `bibliography(style: "path.csl")`.
- [Document symbols](https://code.visualstudio.com/docs/getstarted/userinterface#_outline-view)
- Also known as "document outline" or "table of contents" _in Typst_.
- [Folding ranges](https://burkeholland.gitbook.io/vs-code-can-do-that/exercise-3-navigation-and-refactoring/folding-sections)
- You can collapse code/content blocks and headings.
- [Goto definitions](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-definitions-of-a-symbol)
- Right-click on a symbol and select "Go to Definition".
- Or ctrl+click on a symbol.
- [References](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#find-all-references-to-a-symbol)
- Right-click on a symbol and select "Go to References" or "Find References".
- Or ctrl+click on a symbol.
- [Hover tips](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-hovers)
- Also known as "hovering tooltip".
- [Inlay hints](https://www.jetbrains.com/help/idea/inlay-hints.html)
- Inlay hints are special markers that appear in the editor and provide you with additional information about your code, like the names of the parameters that a called method expects.
- [Color Provider](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-color-decorators)
- View all inlay colorful label for color literals in your document.
- Change the color literal's value by a color picker or its code presentation.
- [Code Lens](https://code.visualstudio.com/blogs/2017/02/12/code-lens-roundup)
- Should give contextual buttons along with code. For example, a button for exporting your document to various formats at the start of the document.
- [Rename symbols and embedded paths](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#rename-symbols)
- [Help with function and method signatures](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#help-with-function-and-method-signatures)
- [Workspace Symbols](https://code.visualstudio.com/api/language-extensions/programmatic-language-features#show-all-symbol-definitions-in-folder)
- [Code Action](https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-code-actions)
- Increasing/Decreasing heading levels.
- [experimental/onEnter](https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#on-enter)
- Enter inside triple-slash comments automatically inserts `///`
- Enter in the middle or after a trailing space in `//` inserts `//`
- Enter inside `//!` doc comments automatically inserts `//!`Extra features:
- Compiles to PDF on save (configurable to as-you-type, or other options).
- Compiles to SVG, PNG, HTML, Markdown, Text, and other formats by commands, vscode tasks, or code lenses.
- Provides code lenses for exporting to PDF/SVG/PNG/etc.
- Provides a status bar item to show the current document's compilation status and words count.
- [Editor tools](https://github.com/Myriad-Dreamin/tinymist/tree/main/tools/editor-tools):
- View a list of templates in template gallery. (`tinymist.showTemplateGallery`)
- Click a button in template gallery to initialize a new project with a template. (`tinymist.initTemplate` and `tinymist.initTemplateInPlace`)
- Trace execution in current document (`tinymist.profileCurrentFile`).## Versioning and Release Cycle
Tinymist's versions follow the [Semantic Versioning](https://semver.org/) scheme, in format of `MAJOR.MINOR.PATCH`. Besides, tinymist follows special rules for the version number:
- If a version is suffixed with `-rcN` (), e.g. `0.11.0-rc1` and `0.12.1-rc1`, it means this version is a release candidate. It is used to test publish script and E2E functionalities. These versions will not be published to the marketplace.
- If the `PATCH` number is odd, e.g. `0.11.1` and `0.12.3`, it means this version is a nightly release. The nightly release will use both [tinymist](https://github.com/Myriad-Dreamin/tinymist/tree/main) and [typst](https://github.com/typst/typst/tree/main) at **main branch**. They will be published as prerelease version to the marketplace.
- Otherwise, if the `PATCH` number is even, e.g. `0.11.0` and `0.12.2`, it means this version is a regular release. The regular release will always use the recent stable version of tinymist and typst.The release cycle is as follows:
- If there is a typst version update, a new major or minor version will be released intermediately. This means tinymist will always align the minor version with typst.
- If there is at least a bug or feature added this week, a new patch version will be released.## Installation
Follow the instructions to enable tinymist in your favorite editor.
- [VS Cod(e,ium)](https://myriad-dreamin.github.io/tinymist//frontend/vscode.html)
- [NeoVim](https://myriad-dreamin.github.io/tinymist//frontend/neovim.html)
- [Emacs](https://myriad-dreamin.github.io/tinymist//frontend/emacs.html)
- [Sublime Text](https://myriad-dreamin.github.io/tinymist//frontend/sublime-text.html)
- [Helix](https://myriad-dreamin.github.io/tinymist//frontend/helix.html)
- [Zed](https://myriad-dreamin.github.io/tinymist//frontend/zed.html)## Installing Regular/Nightly Prebuilds from GitHub
Note: if you are not knowing what is a regular/nightly release, please don't follow this section.
Besides published releases specific for each editors, you can also download the latest regular/nightly prebuilts from GitHub and install them manually.
- Regular prebuilts can be found in [GitHub Releases](https://github.com/Myriad-Dreamin/tinymist/releases).
- Nightly prebuilts can be found in [GitHub Actions](https://github.com/Myriad-Dreamin/tinymist/actions). For example, if you are seeking a nightly release for the featured [PR: build: bump version to 0.11.17-rc1](https://github.com/Myriad-Dreamin/tinymist/pull/468), you could click and go to the [action page](https://github.com/Myriad-Dreamin/tinymist/actions/runs/10120639466) run for the related commits and download the artifacts.To install extension file (the file with `.vsix` extension) manually, please Ctrl+Shift+X in the editor window and drop the downloaded vsix file into the opened extensions view.
## Documentation
See [Online Documentation](https://myriad-dreamin.github.io/tinymist/).
## Packaging
Stable Channel:
[![Packaging status](https://repology.org/badge/vertical-allrepos/tinymist.svg)](https://repology.org/project/tinymist/versions)
Nightly Channel:
[![Packaging status](https://repology.org/badge/vertical-allrepos/tinymist-nightly.svg)](https://repology.org/project/tinymist-nightly/versions)
## Roadmap
- Spell checking: There is already a branch but no suitable (default) spell checking library is found.
- Periscope renderer: It is disabled since vscode reject to render SVGs containing foreignObjects.
- Inlay hint: It is disabled _by default_ because of performance issues.
- Find references of dictionary fields and named function arguments.
- Go to definition of dictionary fields and named function arguments.
- Improve symbol view's appearance.## Contributing
Please read the [CONTRIBUTING.md](CONTRIBUTING.md) file for contribution guidelines.
## Acknowledgements
- Partially code is inherited from [typst-lsp](https://github.com/nvarner/typst-lsp)
- The [integrating](https://github.com/Myriad-Dreamin/tinymist/tree/main/editors/vscode#symbol-view) **offline** handwritten-stroke recognizer is powered by [Detypify](https://detypify.quarticcat.com/).
- The [integrating](https://github.com/Myriad-Dreamin/tinymist/tree/main/editors/vscode#preview-command) preview service is powered by [typst-preview](https://github.com/Enter-tainer/typst-preview).
- The [integrating](https://github.com/Myriad-Dreamin/tinymist/tree/main/editors/vscode#managing-local-packages) local package management functions are adopted from [vscode-typst-sync](https://github.com/OrangeX4/vscode-typst-sync).