typst-lsp icon indicating copy to clipboard operation
typst-lsp copied to clipboard

cannot correctly recognise the path from environment variables

Open zcorn2017 opened this issue 1 year ago • 1 comments

  • Component:
    • [x] VSCode Extension
    • [ ] VSCodium Extension
    • [x] LSP (used with other editor)
  • Extension version: NA
  • LSP version: 0.4.1
  • OS version and name: ArchLinux
  • [x] I am on the latest stable version of the extension/LSP.
  • [x] I have searched the issues of this repo and believe that this is not a duplicate.

Issue

The server cannot correctly recognise the path from environment variables, which is a new feature recently released from v3.0. For details, you refer to v0.3.0.

Font path and compilation root can now be set with the environment variables TYPST_FONT_PATHS and TYPST_ROOT

For instance,

#import "/template.typ": *

would give file not found. This bug prevents the server from compiling the file.

Thank you in advance.

zcorn2017 avatar May 03 '23 11:05 zcorn2017

I have this issue as well. Can't use most of typst-lsp features in my projects because I use some shared functions which i store in TYPST_ROOT=~/.local/share/typst/ - that includes not only my personal use modules but also libraries like typst-canvas.

thecaralice avatar Jun 14 '23 01:06 thecaralice