1

Last night the #region and #endregion were working fine in VSCode for .py (python) interactive notebook files. Today, the gutter (carrot left of #region) has disappeared ctrl+k,ctrl+0 no longer collapses between #region and #endregion. There's no way to collapse manually either. The version of VSCode does not appear to have updated (1.63.2) from 4 wks ago. I tried reinstalling VSCode with multiple computer restarts, but the settings are all automatic and reloaded on startup again. Any suggestions would be appreciated. Very odd if it's a bug since there doesn't appear to have been an update.
Picture below w/ no carrot for collapsing left of #region

Picture w no carrot for collapsing the gutter

John jt
  • 51
  • 6
  • 1
    This also just happened to me. I did a clean reinstall, and narrowed it down to the Microsoft Python extension. If I uninstall that extension, region folding works. If I install it, region folding stops working. – Jeff Robbins Jan 15 '22 at 16:11
  • 1
    I posted at https://github.com/microsoft/vscode-python/discussions/18297 asking about this seeming regression. – Jeff Robbins Jan 15 '22 at 19:14
  • 1
    Thanks Jeff. Pylance version 2022.1.1 from a few days ago does appear to have caused the issue. Rolling back to 2022.1.0 and restarting the computer fixed the issue. Hopefully they catch the bug on the next release. – John jt Jan 16 '22 at 22:33

1 Answers1

0

Hi You can enable code folding in settings in vs code.

just go to settings, type code folding

Then under Editor: Folding, tick the box

domdaviesdev
  • 89
  • 1
  • 5