jupyterlab / jupyterlab

JupyterLab computational environment.
https://jupyterlab.readthedocs.io/
Other
13.81k stars 3.12k forks source link

Make the block comment work in Python (and other languages without block comments) #16212

Open krassowski opened 3 weeks ago

krassowski commented 3 weeks ago

Problem

Proposed Solution

Either or both:

Additional context

See discussion in upstream issue https://github.com/codemirror/dev/issues/1372 - upstream will not include that command nor the """ syntax for Python so it is up to JupyterLab to implement it.

krassowski commented 3 weeks ago

These lines would need to be modified for (b):

https://github.com/jupyterlab/jupyterlab/blob/2dd8f4ebfdf604f61dd3cc1e4f6da14547e89833/packages/codemirror-extension/src/commands.ts#L81-L90

krassowski commented 3 weeks ago

These lines would need to be modified for (a):

https://github.com/jupyterlab/jupyterlab/blob/2dd8f4ebfdf604f61dd3cc1e4f6da14547e89833/packages/codemirror/src/language.ts#L476-L495

krassowski commented 3 weeks ago

Some research is needed on (a) - what other other IDEs do? Do they use """ syntax for block comment, or do they fall back to multiple #?

smbrett commented 3 weeks ago

Hi I would like to work on this issue.

krassowski commented 3 weeks ago

Please do!