feat: customize paste behaviors in vscode (#2238)
Some checks failed
tinymist::auto_tag / auto-tag (push) Has been cancelled
tinymist::ci / Duplicate Actions Detection (push) Has been cancelled
tinymist::ci / Check Clippy, Formatting, Completion, Documentation, and Tests (Linux) (push) Has been cancelled
tinymist::ci / Check Minimum Rust version and Tests (Windows) (push) Has been cancelled
tinymist::ci / prepare-build (push) Has been cancelled
tinymist::gh_pages / build-gh-pages (push) Has been cancelled
tinymist::ci / announce (push) Has been cancelled
tinymist::ci / build (push) Has been cancelled

Close #1830 and close #2063 

The hook script feature is available since `tinymist` v0.14.2.

Hook Scripts allow you to hook and customize certain behaviors of tinymist by providing code snippets that will be executed at specific events.

The hook scripts are run as typst scripts with some predefined variables. Since typst is sandboxed, the hook scripts cannot access system directly. However, you can still bind lsp commands to perform complex operations.

See https://myriad-dreamin.github.io/tinymist/feature/script-hook.html.

- [x] run a demo
- [x] finish tests
- [x] add docs
This commit is contained in:
Myriad-Dreamin 2025-11-11 20:26:58 +08:00 committed by GitHub
parent c206933bf5
commit 06c2240caa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 563 additions and 81 deletions

View file

@ -8,13 +8,13 @@ Converts a subset of typst to markdown.
### Install prebuilt binaries via shell script
```sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Myriad-Dreamin/tinymist/releases/download/v0.13.26-rc1/typlite-installer.sh | sh
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/Myriad-Dreamin/tinymist/releases/download/v0.14.0/typlite-installer.sh | sh
```
### Install prebuilt binaries via powershell script
```ps1
powershell -ExecutionPolicy Bypass -c "irm https://github.com/Myriad-Dreamin/tinymist/releases/download/v0.13.26-rc1/typlite-installer.ps1 | iex"
powershell -ExecutionPolicy Bypass -c "irm https://github.com/Myriad-Dreamin/tinymist/releases/download/v0.14.0/typlite-installer.ps1 | iex"
```
## Usage