Closed muroc closed 4 months ago
Ah! Thank you for creating the issue. I've only tested TypstWatch once on Windows so this is valuable input.
For Windows, I'm doing this. You can try running that in the terminal, i.e.:
cmd /s /c "typst watch --diagnostic-format short 'test.typ' --open"
You can also confirm the actual jobstart arguments:
echom l:str
let s:watcher = l:JobStart(l:str, l:options)
Running your command in the terminal produces this error:
error: input file not found (searched at 'test.typ').
However, if I remove the single quotes around test.typ
, the command works and the PDF is generated.
cmd /s /c "typst watch --diagnostic-format short test.typ --open"
Digging into this a little bit more: typing typst watch 'test.typ'
into a command prompt gives the error as before, but typing it into Powershell works. It seems like the command prompt just doesn't like the single quotation marks around the file name.
To confirm this, I removed two of the single quotation marks from this line to the following:
\ . " " . expand('%') . ""
With the above change, the TypstWatch
command in the plugin seems to function normally.
Sorry for late response! Check if branch fix-84
fixes the problem.
Don't worry about it. Thanks for looking into a fix.
I can confirm that the fix-84
works on one of my machines. I won't be able to test on the other one until Monday.
Hi @muroc, did you manage to confirm it on windows?
Yes. I have tried it on both the Windows machines that I have access to, and the fix seems to work without issue.
@kaarmu,
Sorry to bug you about this again, but I would like to ask about moving forward. Is there any hope that this fix could be introduced into the main branch, or will this have to remain as a separate branch?
Thanks again for your help on this issue!
Oh, sorry! I forgot to actually merge it. Now it's done!
OS: Windows 10 22H2 Nvim version: v0.9.5 Terminal emulator: Alacritty & Powershell
When using the
TypstWatch
command, the following line is displayed, but nothing else seems to happen.The PDF file does not get updated nor generated if missing, and my PDF viewer does not open.
Running
typst watch 'test.typ' --open
in the terminal seems to work fine. It's like the command in the editor just isn't getting run for some reason.I'm not really sure how to troubleshoot this to figure out what my issue is, so any advice would be appreciated.