Enter-tainer / typst-preview

[DEPRECATED] Use tinymist instead

Home Page:https://Enter-tainer.github.io/typst-preview/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Relative paths don't work in `typst-preview.fontPaths`

Myriad-Dreamin opened this issue · comments

I have a configuration of typst-preview.fontPaths, it works with absolute paths:

{
  "typst-preview.fontPaths": [
    "/home/user/work/typst/tutorial/assets/fonts",
    "/home/user/work/typst/tutorial/assets/typst-fonts"
  ]
}

But I do want to use relative paths so that I can commit it to my git repository.

{
  "typst-preview.fontPaths": [
    "./assets/fonts",
    "./assets/typst-fonts"
  ]
}

To Reproduce

Use the configuration.

Expected behavior

Let relative paths work. Ideally we can also let vscode variables work.

Package/Software version:

typst-preview extension version: v0.10.8

Maybe use ${workspaceFolder}, see #107

But it's still interesting why relative path won't work 🤔

Maybe use ${workspaceFolder}, see #107

It works.

But it's still interesting why relative path won't work 🤔

Maybe for typst-preview the . is ~/.cache/vscode/.... I guess. I think this could be improved