Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable showing Line Number in jupyter lab by default

We can enable/disable showing LineNumbers in each code block from "View" tab in Jupyter Lab. But this has to be done every time I open new instance of Jupyter-lab. It doesn't keep showing lineNumber enabled ON by default.

How do I keep showing lineNumber enabled by default ?

like image 891
Vivek Dani Avatar asked Sep 18 '25 09:09

Vivek Dani


1 Answers

Go to "Settings" tab-->"Advanced Settings Editor"-->"Notebook"

Paste the following under "User Preferences" section and SAVE:

{ "codeCellConfig": {
        "autoClosingBrackets": true,
        "fontFamily": null,
        "fontSize": null,
        "lineHeight": null,
        "lineNumbers": true,
        "lineWrap": "off",
        "matchBrackets": true,
        "readOnly": false,
        "insertSpaces": true,
        "tabSize": 4,
        "wordWrapColumn": 80,
        "rulers": [],
        "codeFolding": false,
        "lineWiseCopyCut": true
    }
}
like image 51
Vivek Dani Avatar answered Sep 20 '25 23:09

Vivek Dani