Enter-tainer / typst-preview

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

add an option to enable automatically opening preview window #140

Open viocha opened 8 months ago

viocha commented 8 months ago

Just like the way Markdown Preview Enhanced behaves

Enter-tainer commented 8 months ago

can you elaborate?

viocha commented 8 months ago

when you open the source file, the preview window is automatically displayed on the side.

image

动画

Enter-tainer commented 8 months ago

Thanks for your screen recording. It's good to have this feature. But there is one thing I concern. A typst-preview tab is much more heavier than a markdown preview(you may refer to https://enter-tainer.github.io/typst-preview/arch.html if you are interested). So launching too much preview tab would become a problem. Another problem is that not all typst file is previewable, such as template files. opening preview for these files doesn't make sense

Myriad-Dreamin commented 8 months ago

link similar design issue https://github.com/nvarner/typst-lsp/issues/285

eduardz1 commented 2 months ago

Thanks for your screen recording. It's good to have this feature. But there is one thing I concern. A typst-preview tab is much more heavier than a markdown preview(you may refer to https://enter-tainer.github.io/typst-preview/arch.html if you are interested). So launching too much preview tab would become a problem. Another problem is that not all typst file is previewable, such as template files. opening preview for these files doesn't make sense

Maybe it could be an option in .vscode/settings.json? something like

"typst-preview.main": "main.typ",
"typst-preview.automatically-show": true

where you specify the main file, this only makes sense in projects where only one file should be compiled.