Closed SillyFreak closed 1 year ago
For what it's worth, the Typst 0.6 implementation is actually wrong and looks in the same place as Typst 0.7. (I didn't notice I was developing off old documentation, and typst-lsp 0.8 was current for such a short time that I decided to leave it.)
I'll look into what could be causing this for typst-lsp v0.9, since that is a bug.
It looks like I was using the wrong directory for local packages (~/.config/typst/packages/...
). I'll make a fix for that now, which should be quick. Unless it's harder than I expect, the fix will appear in the next release.
thanks! your plugin (and by extension the LSP) is great; this fix will help me putting off more important work for sure!
Thanks for the error report! Glad to hear the project is helpful. And unfortunately, this fix is doing the same for me :)
It should be fixed in the next release.
212 brought up missing package support in 0.7.2, but the new status quo is that packages should be working, and
@preview
packages are indeed working.Issue
(typst 0.6.0 information is just for the sake of completeness of the analysis. I observed the behavior in both versions, but of course only care about the latest one.)
I have installed a test package locally at
~/.local/share/typst/packages/local/template/0.0.1/
(typst 0.6.0:~/.local/share/typst/packages/local/template-0.0.1/
). In an example typst file, I have referred to two libraries like this:Running
typst c test.typ
compiles the file successfully, so I am confident that the local package is valid. However, the VSCode extension shows the error "package not found (searched for @local/template:0.0.1)" on the second line. Removing the local package reference (keeping the remote one) works.Logs
Nothing illuminating; there's
textDocument/publishDiagnostics
with the message above, the compilation failure, and some events that I assume are pretty standard.