PDF not exported when non-main source files are changed (onSave or onType)
- Component:
- [x] VSCode Extension
- [ ] VSCodium Extension
- [x] LSP (used with other editor)
- Extension version: v0.3.1
- LSP version:
- OS version and name:
- [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
Reproduce:
- [VSCode Extension setting] Export PDF:
onSaveandonType - Folder structure
.
├── other.typ
├── main.pdf
├── main.typ
└── template.typ
- In
main.typ:
#include "other.typ"
When other.typ is modified, the PDF will not be rendered automatically.
This behaviour is also present when using only the LSP component.
This behaviour is also present when using only the LSP component.
Just also toggled the LSP checkbox.
Related https://github.com/nvarner/typst-lsp/issues/11
I was table to work around this by running typst watch main.typ and changing ctrl+s to File: Save all files. This leads to a smooth workflow with multiple files.
It should be possible to configure a langage-dependent binding of ctrl+s to save all files, and make a command that is Typst: watch X.typ, which when selected, opens a list of all typst files in current directory, and when the user presses enter on one of them, watches that file.
I am not sure how to incoperate a log upon errors with this approach, which is something that I miss. This is no problem with the manual approach of opening a terminal and running typst watch main.typ in the same group as the PDF, allowing easy swiching between terminal and PDF.