Adds a VS Code topbar button to JupyterLab.
Project description
purdue_af_vscode_button
Adds a JupyterLab topbar button that opens the proxied code-server (VS Code) interface in a new browser tab.
Command ID
Register this command in top-bar.jupyterlab-settings:
jupyterlab-topbar:switch-to-vscode
Top bar configuration
Add the button to .jupyter/lab/user-settings/@jupyterlab/application-extension/top-bar.jupyterlab-settings (or via config-extensions.sh in the purdue-af image):
{
"toolbar": [
{
"name": "vscode",
"command": "jupyterlab-topbar:switch-to-vscode",
"disabled": false,
"rank": 155
},
{
"name": "shutdown",
"command": "jupyterlab-topbar:shutdown",
"disabled": false,
"rank": 160
}
]
}
Clicking the button opens {baseUrl}vscode/?folder=/home/{username} in a new tab, using the Jupyter single-user server baseUrl (no hardcoded hostnames).
purdue-af image integration (downstream)
After publishing to PyPI, update the purdue-af repository:
docker/purdue-af/pixi.toml— addpurdue-af-vscode-button = "==0.1.0"(orpurdue_af_vscode_buttonper your lockfile convention).docker/purdue-af/scripts/config-extensions.sh— add the topbar entry shown above before the shutdown button.
Requirements
- JupyterLab >= 4.0.0
Install
pip install purdue_af_vscode_button
Uninstall
pip uninstall purdue_af_vscode_button
Contributing
Development install
Note: You will need NodeJS to build the extension package.
The jlpm command is JupyterLab's pinned version of
yarn that is installed with JupyterLab. You may use
yarn or npm in lieu of jlpm below.
# Change directory to the purdue-af-vscode-button directory
pip install -e "."
jupyter labextension develop . --overwrite
jlpm build
jlpm watch
jupyter lab
Development uninstall
pip uninstall purdue_af_vscode_button
Remove the purdue-af-vscode-button symlink from the labextensions folder reported by jupyter labextension list.
Packaging the extension
See RELEASE
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters