Enter-tainer / typst-preview

[DEPRECATED] Use tinymist instead
https://Enter-tainer.github.io/typst-preview/
MIT License
448 stars 21 forks source link

[Feature Request] Shipping pre-built binary & Real-time preview #1

Closed slanterns closed 1 year ago

slanterns commented 1 year ago
  1. Since not everyone has a Rust toolchain, it will be good to ship a pre-built typst-ws binary like what rust-analyzer or CodeLLDB does;
  2. Currently the rendering result will only be refreshed after saving, which is counter-intuitive. It will be better to work like those Markdown previewers that sync the content immediately.
Enter-tainer commented 1 year ago

For 1, it is needed to set up ci in https://github.com/Enter-tainer/typst-ws . And download the latest(?) artifact in this extension.

For 2, currently typst-ws works by listening to fs events (which is the same as the official 'typst watch'). I'm not sure how to port the "preview on type" style to this for now.


Update: now prebuit binary for Window/Linux/macOS-x64 is added in the readme.

Enter-tainer commented 1 year ago

Seems that rust-analyzer ships binary within its vsix bundle. We may also follow the clangd approach, by downloading the latest artifact from github. I'm not sure how to distribute vsix bundle for different platforms. Maybe the clangd one is easier.

Enter-tainer commented 1 year ago

2 is done, by writing unsaved changes to a temp file.

Enter-tainer commented 1 year ago