Enter-tainer / typst-preview

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

Typst Preview in coder's vscode server #292

Open ntjess opened 1 month ago

ntjess commented 1 month ago

Similar to #172, but hopefully easier to support? https://coder.com allows you to spawn a code-server which works with most marketplace extensions. You can see in the screenshot that both extensions are enabled!

image

The only challenge is, the preview pane is blank. Presumably, this is because the ports used for previewing are not exposed in the workspace provision. Unfortunately, this area is not my expertise, so I'm not sure if I am missing an obvious solution. Is there a simple way to know ahead of time which ports will be used for the preview, and somehow expose them to the coder workspace?

This would go a very long way toward remotely-accessible typst previewing 🙂

To reproduce:

  1. Install coder
  2. Run coder server, which will provide a listener on localhost:3000
  3. Navigate to localhost:3000 and create an account (it's only stored in a local postgres)
  4. Create a Docker template from their starter templates and "create a workspace" from that docker template image
  5. In the workspace, select "code-server" image
  6. Install the vscode extensions, create some typ file contents, and select the "preview" option.

Note that the PDF compiler from tinymist works without any issues.

Enter-tainer commented 1 month ago

i will try coder and see what is needed to make it work

metorm commented 1 month ago

I got this problem, too.