VSCode: watch for changes in server preview #1939
Replies: 5 comments 9 replies
-
Yes, these feature do in fact exist! The Quarto VS Code Extension has integrated support for |
Beta Was this translation helpful? Give feedback.
-
Okay, I'll investigate the slide navigation issue further. To be clear, the preview feature works the same for websites and presentations: you always need to do a render to trigger a preview (not just a save, although note that render also executes a save). We do this so that users have a choice between merely saving and doing a (potentially very expensive) save and render. If we collapsed render into save (i.e. always render on save) then saving might become something you can do very infrequently b/c it takes so long / crushes your laptop battery. This might not be applicable in your case but there are many users that have documents that take dozens of seconds or even minutes to render. |
Beta Was this translation helpful? Give feedback.
-
Slide navigation is working for me w/ VS Code extension v1.32.0 and Quarto v1.1 Pre-Release (https://quarto.org/docs/download/prerelease.html). Perhaps something we fixed in the Pre-Release but I don't recall that being the case. One thing to know is that slide navigation doesn't work for the very first navigation within a |
Beta Was this translation helpful? Give feedback.
-
There is a difference in behavior between RStudio actually has a check box to enable "Render on Save" however VS Code doesn't yet have such an option. w/r/t the issue you found, this may not be easily resolvable as we are attempting to discern the slide indexes from the source code, and that code chunk appears to us as "content" (we don't know what it's doing). I think that the setup chunk in knitr is such a common idiom though that we probably should special-case that. I'll keep this issue open to track this work. Note also that you can do the same in YAML with:
|
Beta Was this translation helpful? Give feedback.
-
Hello, Directly calling quarto preview from terminal or setting quarto preview to external in extension settings doesn't mess the navigation, but doesn't refresh external browser either, so it's not really a viable workaround. I'm on Quarto version 1.5.57 and VS Code extension 1.116.0. Any ideas, how this can be fixed again? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently there is no easy way to start a live server which watches for input changes (similar to
xaringan::inf_mr()
).My current workaround is as follows
quarto preview <.qmd> --no-browser
.html
in an integrated vscode browser windowWhile this web server watches for changes, it does not change slides automatically to the one which included the last change.
It would be great if
serve
command/option would exists besides the static render functionalityBeta Was this translation helpful? Give feedback.
All reactions