jupyterlab-code-snippets
jupyterlab-code-snippets copied to clipboard
Allow globally defined snippets in overrides.json
Currently if we want to provide JupyterLab's users globally defined snippets by setting them inside <sys.prefix>/local/share/jupyter/lab/settings/overrides.json
(see JupyterLab's documentation), these are ignored until manually set inside ~/.jupyter/lab/user-settings/jupyterlab-code-snippets/snippets.jupyterlab-settings
via the widget or the settings GUI.
The goal of this commit is to allow snippets initialization through extension overridden settings without user interaction at Lab startup.
Dummy overrides.json
example:
{
"jupyterlab-code-snippets:snippets": {
"snippets": [
{
"id": 1,
"tags": [],
"name": "Hello World",
"language": "Python",
"code": "print('Hello, World!')"
}
]
}
}