Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add code folding regions for # %% cells within python files #11418

Merged
merged 3 commits into from
Sep 21, 2022

Conversation

amunger
Copy link
Contributor

@amunger amunger commented Sep 20, 2022

fixes #1527

re-use the ranges that the codelense provider is already calculating

Copy link
Contributor

@DonJayamanne DonJayamanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd change this to register the providers like in PythonKernelCompletionProviderRegistration

@codecov-commenter
Copy link

Codecov Report

Merging #11418 (8f4e999) into main (2d32b19) will increase coverage by 0%.
The diff coverage is 81%.

❗ Current head 8f4e999 differs from pull request most recent head a5777cf. Consider uploading reports for the commit a5777cf to get more accurate results

@@          Coverage Diff           @@
##            main   #11418   +/-   ##
======================================
  Coverage     63%      63%           
======================================
  Files        476      477    +1     
  Lines      33951    33983   +32     
  Branches    5506     5509    +3     
======================================
+ Hits       21540    21578   +38     
+ Misses     10355    10346    -9     
- Partials    2056     2059    +3     
Impacted Files Coverage Δ
...ow/editor-integration/pythonCellFoldingProvider.ts 73% <73%> (ø)
src/interactive-window/editor-integration/types.ts 100% <100%> (ø)
src/interactive-window/serviceRegistry.node.ts 100% <100%> (ø)
src/standalone/activation/globalActivation.ts 90% <100%> (+<1%) ⬆️
...kernels/jupyter/preferredRemoteKernelIdProvider.ts 85% <0%> (-8%) ⬇️
src/kernels/helpers.ts 66% <0%> (-2%) ⬇️
src/platform/msrCrypto/msrCrypto.js 19% <0%> (-1%) ⬇️
src/standalone/import-export/importTracker.node.ts
...s/jupyter/jupyterCellOutputMimeTypeTracker.node.ts
src/standalone/import-export/importTracker.ts 87% <0%> (ø)
... and 9 more

@amunger amunger merged commit 0a0b18c into main Sep 21, 2022
@amunger amunger deleted the aamunger/cellFolding branch September 21, 2022 21:27
@rgbmrc
Copy link

rgbmrc commented Oct 27, 2022

Is it possible to disable this? I am afraid it messes with preexisting # region blocks.

@amunger
Copy link
Contributor Author

amunger commented Oct 27, 2022

@rgbmrc - the pre-release version has a jupyter.pythonCellFolding setting, and it should be available in release next week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make cells (# %%) collapsible python files
5 participants