question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Jupyter Notebook doesn't respect VS Code "editor.folding" setting

See original GitHub issue

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I have disabled code folding globally in VS Code with the "editor.folding": false setting in my settings.json.

But Jupyter Notebook doesn’t respect this setting and shows the code folding arrows.

It seems a new jupyter.pythonCellFolding setting was added recently (https://github.com/microsoft/vscode-jupyter/pull/11737), but it doesn’t seem to default to the editor.folding value. I think it should.

VS Code Version

Version: 1.72.2 (user setup) Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075 Date: 2022-10-12T22:15:18.074Z Electron: 19.0.17 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No

Jupyter Extension Version

v2022.9.1202862440

Jupyter logs

No response

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Local

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
2-5commented, Oct 27, 2022

Interesting line you linked to:

export class FoldingController extends Disposable implements INotebookEditorContribution {
  static id: string = 'workbench.notebook.findController';

Is workbench.notebook.findController a typo? It says findController but it seems to me that id should be workbench.notebook.foldController to match the FoldingController class name.

0reactions
rebornixcommented, Nov 2, 2022

workbench.notebook.findController is an oversight but it should not affect the functionalities. Also note that this folder controller is for folding markdown cells instead of folding inside cell editor. I’m not sure what went wrong except the jupyter.pythonCellFolding related one.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How VSCode has leaped forward as Jupyter Notebook Editor
I was rather on a quest for a better option to work with Jupyter Notebooks, which culminated in VSCode. However, the experience with...
Read more >
Working with Jupyter Notebooks in Visual Studio Code
Work with Jupyter code cells; View, inspect, and filter variables using the Variable Explorer and Data Viewer; Connect to a remote Jupyter server;...
Read more >
VS Code editing .ipynb file: How to collapse notebook cells?
1. double click gutter area (immediate space on left side of code cell) to Expand/Collapse cell (code/output) 2. right click on gutter area ......
Read more >
Playing with Data in Jupyter Notebooks with VS Code - YouTube
Jupyter notebooks are very popular in data science communities and are a great way to develop and share code. Did you know they...
Read more >
Jupyter in Visual Studio Code – June 2021 Release - Python
**Note: It is important to understand that notebooks may have harmful code embedded in their outputs and may run without you executing the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found