Hi @eee, welcome and thank you for your question! I have changed your post’s title to bring it in line with the question guidelines and thus make it easier to understand from the title:
Good titles are questions you would ask your friend about Typst.
I also added the tinymist tag, as it makes your question easier to find.
To your question – I have copied that code into my VS Code and the preview was shown without problem.
- Have you tried restarting VS Code, and your computer?
- Is there anything in the locations indicated here? I would be surprised if there’s anything wrong with the files there if regular compilation works, but
- you can try deleting the cache directory (it will be regenerated anyway)
- if you don’t use local packages, the corresponding directory should be empty or not exist, so you can try deleting that too if you don’t use it.
VS Code has an output view: in View
, select Output
or in the command palette, select View: Toggle Output
. Once there, select Tinymist Typst
in the dropdown menu, and see if anything looks relevant.