jupyterlab
jupyterlab copied to clipboard
Add an option to continue indentation, upgrade `@codemirror/commands`
References
Closes #16196
Code changes
- [x] update
@codemirror/commands - [x] add an option to continue indentation
- [ ] add a test
User-facing changes
New continue indentation option:
TBD, as the current behaviour of insertNewlineKeepIndent turned out to be different from what I thought it would do, see https://github.com/codemirror/dev/issues/1370#issuecomment-2079392856.
Depending on whether upstream (CodeMirror) reconsiders, we may need to do something different, for example always run insertNewlineAndIndent while comparing the indentation before and after and if it decreased at the end of the block we would re-add the indentation. Or maybe we need to vendor a modified copy of insertNewlineAndIndent which does not dedent at the end of the block (not sure if this is feasible). Or maybe we need to modify the Python language implementation only in which case this PR would be of little use in the current state.
Backwards-incompatible changes
None
Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link:
Closing in favour of https://github.com/jupyterlab/jupyterlab/pull/16306