Issue
I have two sub-questions of the question shown in title:
Where does JupyterLab store
System Defaults
andUser Preference
files?I want to customized my own JupyterLab settings by editing the config file, and there are several file path suggestion I found in websites:
/usr/local/share/jupyter/lab/settings/overrides.json
~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
/usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
- My question is: Which correct file should I edit if I want to adjust settings like code folding, line wrapping? Or none of above, there is other file I should use?
PS. Because I start JupyterLab in a docker container, and I rebuild the container frequently, I want to change the default settings by editing the config file instead of changing these settings in the GUI every time.
Thank you all.
ref:
- JupyterLab User Settings File
- Enable word wrap in JupyterLab code editor
- https://jupyterlab.readthedocs.io/en/stable/user/directories.html
Solution
The codeFolding & wordWarping settings are related to the jupyterlab extension
—@jupyterlab/notebook-extension
and the plugin
—tracker
.
There are two Jupyter Lab User Setting files you can edit to adjust codeFolding setting.
So there are two options, you can choose one of them:
file 1:
~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
According to the documents of jupyter lab:
By default, the location is
$HOME/.jupyter/lab/user-settings/
, where$HOME
is the user’s home directory. This folder is not in the JupyterLab application directory because these settings are typically shared across Python environments. The location can be modified using theJUPYTERLAB_SETTINGS_DIR environment
variable.JSON5 files are automatically created in this folder recording the settings changes a user makes in the JupyterLab Advanced Settings Editor. The file names follow the pattern of
<extension_name>/<plugin_name>.jupyterlab-settings
.So we should edit
~/.jupyter/lab/user-settings/@jupyterlab/notebook-extension/tracker.jupyterlab-settings
.Any settings you write in this file, would override the default settings
file 2:
/usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
We can also edit/usr/local/share/jupyter/lab/schemas/@jupyterlab/notebook-extension/tracker.json
.But by editing this file, you are change default settings directly.
Answered By - theabc50111
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.