Use background task for document rendering
jooyoungseo opened this issue · 1 comments
Currently a new terminal instance is created when rendering qmd file via Ctrl+Shift+K
. Would there be any settings to do this by using background task just like vscode-R?
We have gone back and forth on this and settled on the terminal because it is better able to reconstruct the user's intended computing environment. You see this most markedly for Python: When users choose a Python environment for their workspace (or globally) VS Code automatically activates the conda or virtualenv in the Terminal when it starts. Without this we actually don't "see" the intended Python packages, etc.
Further, users often define other important environment variables in their shell startup scripts (.bash_profile
, .bashrc
, etc.). These variables will often be required to successfully run code (e.g. JVM paths, LD_LIBRARY_PATH, etc.). If we don't use a terminal we don't see these variables either.
The last disadvantage to background tasks we noted was that there is no easy way for users to terminate them (we ended up adding a command for this, but it's pretty difficult to discover).