Is it possible to use TinyMist with VSCode portable?

Typst works fine with VSCode when I install it on my home computer. However on my work computer will not allow me to install executable files so I’ve been using a portable version of VSCode from a usb. I am able to open VSCode and install Tinymist fine, however when I want to preview the pdf file I get the following error

crates\tinymist\src\task\export.rs:374:13: ExportTask(ExportPdf(ExportPdfTask { export: ExportTask { when: Never, output: Some(PathPattern(“”)), transform: }, pages: None, pdf_standards: , no_pdf_tags: false, creation_timestamp: None })): output path is relative: “Untitled-1”

Is there something else I should be doing?

Untitled-1

Have you tried to save the file first?

I once encountered a similar error on my home computer, and it turned out that I have to save the file before starting the preview.

At that time I contacted the authors of tinymist. They replied that previewing Untitled-n files could be supported, but was never tested seriously (say, what does image("a.png") in an Untitled file mean?). Therefore, the relevant code path was disabled. If more people want to use this feature, tinymist is open to support that.
(Be aware that the conversation happened months ago. I don’t know if the situation has changed.)

Saving seems to work ok on my home computer however on my work computer I get a different error message which is

Cannot find a valid tinymist binary. Some features like auto-formatting on Enter may not work. Please check your tinymist.serverPath configuration. Exception: Error: Could not find a valid tinymist binary.
Bundled (‘d:\VSCode-win32-x64-1.124.2\data\extensions\myriad-dreamin.tinymist-0.15.2-win32-x64\out\tinymist.exe’): failed to probe:
error: spawnSync d:\VSCode-win32-x64-1.124.2\data\extensions\myriad-dreamin.tinymist-0.15.2-win32-x64\out\tinymist.exe UNKNOWN
In PATH (‘tinymist.exe’): failed to probe:
error: spawnSync tinymist.exe ENOENT

I’m not sure if it is looking in the wrong place and there is a way I can update the path?

I guess d:\ is where you mounted the USB?

error: spawnSync tinymist.exe ENOENT

If I remember correctly, that d:\VSCode-win32-x64-1.124.2\data\extensions\myriad-dreamin.tinymist-0.15.2-win32-x64\out\tinymist.exe should be downloaded automatically when installing the VS Code extension. Usually there’s no need to change the path.

Could you check if that file exists and is valid? Execute path/to/tinymist.exe --version in PowerShell, and it should output something like the following.

…/myriad-dreamin.tinymist-0.15.2-win32-x64> ./out/tinymist.exe --version
tinymist
Build Timestamp:     2026-06-22T10:34:37.975175300Z
Build Git Describe:  v0.15.2
Commit SHA:          92babed1bc00540882effd29bc56ebc5986792c2
Commit Date:         None
Commit Branch:       None
Cargo Target Triple: x86_64-pc-windows-msvc
Typst Version:       0.15.0
Typst Source:        git+https://github.com/Myriad-Dreamin/typst.git?tag=tinymist/v0.15.0#391c2dcd698aabf2917db0336868d16f197057d9

Additionally, you might find more debugging info in VS Code’s Output panel: press Ctrl+Shift+U and then choose Tinymist Typst.

By the way, in December 2024, someone met the same problem and resolved it by upgrading to the latest version. See Tinymist v0.12.12 - Unable to start in VSCode - Win32-x64 · Issue #1025 · Myriad-Dreamin/tinymist · GitHub.
Perhaps you can try uninstall and reinstall the extension? That should trigger the downloading process again and might fix the problem.

So when I navigate to that exe file and open it I get a message that says

D:\VSCode-win32-x64-1.124.2\data\extensions\myriad-dreamin.tinymist-0.15.2-win32-x64\out\tinymist.exe

Contact your support person for more info.

I thought that since it was being entirely from my USB that it would be OK on my work computer.

Is there a workaround for this?

I’m not sure, but perhaps you can try to download a standalone tinymist.exe.
To do so, visit Release v0.15.2 · Myriad-Dreamin/tinymist · GitHub, click Download Binary, scroll to Download tinymist 0.15.2, and choose x64 Windows. If tinymist.exe in the downloaded ZIP can be executed on your work computer, then there might be a way to let VS Code use that.

In fact you can, in the settings there’s the entry Tinymist: Server Path

But I’m not sure if relative paths are possible…

Try this Typst Ultra - Visual Studio Marketplace
it’s a pure WASM version which is portable and it doesn’t need any external binaries to be installed on your computer.


I just tried this and it works great.

Not only does it work on the USB/portable version of VSCode but is also works on my work computer too (where I am, strangely enough, allowed to have VSCode but not any extensions).

Thank you.

Oh neat! I saw no repository link on the marketplace page, is it closed source?

Open sourced now.

I’m just having one issue with this however. There seems to be a grey underline that appears on the active live on the live preview. I’m finding it rather distracting as I’m typing, is there an option to turn this off?

Thanks for the feedback. There is a vscode config option typstUltra.preview.cursorIndicator , set it to false to turn it off.
I will turn it off by default in the next version.

That worked.

Thank you again.

Sorry to impose again but I’m noticing that my code is all the same colour and I’m not getting the different text colours for functions/commands etc like in your screenshot above.

Is there another option I need to turn on?

Hi Chris, there might be several reasons. Try these options first:

  1. How about switching the viscode’s default theme and see if it works?
  2. or go to the “> open user settings (json)” and add a line in the config

"[typst]": { "editor.semanticHighlighting.enabled": true },

image

If that doesn’t change anything, try these steps:

  1. open the “> Typst Ultra: Show Log” to see if there are any errors there

  1. open a “.typ” file, put the cursor on a function name, and run “> inspect editor tokens”, check the token and scopes

image

Thanks again for replying.

Here’s a screenshot.

I think it might already be working as intended. It’s just that I’ve got a slightly different default colour theme to yours.

I’ve a few themes but I still can’t get it to look quite like the screenshots you have uploaded.

I am definitely not complaining however, just enjoying tweaking a great extension :slightly_smiling_face:

Thanks for the feedback :slight_smile:
My theme is “Dracula Theme Official”, if you want to try and see if it works.

By the way, I’ve just added syntax highlighting for math formulas in the latest version.

the “$” and numbers will have different colors in math formula.

Thank you. After trying quite a few themes I’ve found that the default dark theme is my favourite.

I know I may be pushing my luck with more requests, but I’ll try anyway :slight_smile: .

When I type in a function, for example #table it will give me a cannot compile error until I have finished typing the whole thing.

What I mean is when I am at the following points #t, #ta, #tab, #tabl it will give an error message.

The thing is that every time I type a new character it will generate a new error message which will cause the preview window to grey out but will flash white for a fraction of a second which can be a bit jarring, especially when typing a function with a longer name.

Is there a way to make the error/cannot compile message more subtle (maybe just a small character that appears in the background rather than greying out the screen) or even switch it off somehow.

I know I can set the options to compile on save rather that compile on type, however other that the above issue I really do quite like the compile on type option.

I’m not sure if it is something that can be changed with the extension or if it is simply a feature of vscode (or if I am looking a gift horse in the mouth as you are already providing this useful extension free of charge).

Thank you for the good suggestion. I’ve fixed it in the next release 0.14.7. :slight_smile: