How does the Jupyter extension control the Notebook File Root? #13994
Closed
itcarroll
started this conversation in
Tips, Tricks and Workarounds
Replies: 1 comment 1 reply
-
This happens after we start the kernel, Have a look at calculateWorkingDirectory in https://github.com/microsoft/vscode-jupyter/blob/main/src/interactive-window/kernelStartupCodeProvider.node.ts The const startupCode = await this.gatherInternalStartupCode();
await this.executeSilently(session, startupCode, {
traceErrors: true,
traceErrorsMessage: 'Error executing jupyter extension internal startup code'
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The default (for me) setting of Notebook File Root (jupyter.notebookFileRoot) is ${workspaceDir}, and this is a really nice improvement over JupyterLab. The JupyterLab project doesn't leverage its "workspace" capability to function as an IDE that is aware of the project's root, so JupyterLab uses the equivalent of ${fileDirname} for the analagous setting. I would like to port this VSCode Jupyter extension behavior to a JupyterLab configuration ... but can't figure out any means to do so!? How does the Jupyter extension achieve this when launching the kernel? Pointer to the relevant code, please?
Beta Was this translation helpful? Give feedback.
All reactions