New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not using ${workspaceFolder}
in "typst-preview.fontPaths"
#107
Comments
nice catch. should we replace these placeholders with acutal paths in config? |
vscode doc said these variables are only supported in launch.json and tasks.json. We can support these vars though. But is it a common practice to do so? |
I would think so, what's your recommendation on an opensource project to share its font? |
For this specific case, I guess setting it to https://www.npmjs.com/package/vscode-variables is mentioned in issues you posted and it looks nice to me. I will fix this soonish. |
if you mean: {
"typst-preview.fontPaths": [
"./fonts"
]
} then the answer is still no. It still won't compile Outpus:
|
Alright, I believe I understand your use case. You have a repository for typst containing fonts. I recommend instructing your users to install these fonts in a designated, standardized location. (In some typesetting software(LaTeX), you even don't have the opportunity to customize font path 😇 ) This issue should be resolved, though. |
Another enhancement but not too related here. Noticed that it produces a unreadable error: "No such file or directory", I should link it to a very old issue Myriad-Dreamin/typst.ts#59. I consider following We may log the real reason of "No such file or directory" and other warnings in diagnostics console to remind users more friendly, @Enter-tainer, regarding to typst 0.6.0 provided |
For sharing font paths, there already an environment variable would be also great for sharing font paths to have capability of inherit |
AFAICT in vscode, local settings simply override global ones so the idea of cascading config files may not work. Other parts looks good to me. Producing better error messages is a good point. |
Describe the bug
In
settings.json
,${workspaceFolder}
is not parsed in "typst-preview.fontPaths" but directly passed as string to typst, causing it unable to compileTo Reproduce
settings.json
:Expected behavior
Error message pops and no window opens.
Package/Software version:
VSCode version(Help -> About):
typst-preview extension version:
v0.7.4
Logs:
typst-preview server log(Output Panel -> typst-preview):
typst-preview client log(Help -> Toggle Developer Tools -> Console):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: