Skip to content
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

Jinja support #487

Open
roaldarbol opened this issue May 2, 2024 · 2 comments
Open

Jinja support #487

roaldarbol opened this issue May 2, 2024 · 2 comments

Comments

@roaldarbol
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the discussions and believe that my question is not already covered.

Feature Request

Hi there, and thanks for a wonderful extension!
I'm working on creating typst templates, which use the jinja2 or nunchucks templating languages (typst recognises these templating languages). However, in VS Code with typst-lsp, it's almost impossible to read the code as the lsp doesn't recognise it. I've attempted installing jinja2 extensions, but that doesn't help (probably because it's a .typ file).
Would it be possible to add jinja/ nunchucks syntax to this lsp?

@KillTheMule
Copy link
Contributor

This isn't what you're asking for, but when putting external data into typst documents I'd suggest you either use sys.inputs, if you're using typst as a library, or its data loading capabilities. This would solve your syntax problem as well :) Although I might have misse something because I don't understand what you mean by "typst recognises these templating languages"...

@roaldarbol
Copy link
Author

I just mean that you can successfully run the script, so it parses the {{ input.here }} blocks correctly. I think this is a relevant issue on the main repo (typst/typst#1511). And supported languages are listed here: typst/typst#1511 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants