Background
With the advent of CodeMirror 6, we open the door to a lot of amazing new features:
- Autocompletion (T95100)
- Code folding (T30684)
- Line numbering (would take precedence over $wgCodeMirrorLineNumberingNamespaces)
- Active line highlighting
To come later:
- Themes (T163533)
- Bidi isolation (T358804)
- Modifier + clicking to open templates (T303392)
- HTML tag matching
- Rectangular selection
- Linting
These are amazing, but surely won't be desired by all. Meanwhile we want to avoid adding these to Special:Preferences both to not clutter it further, but also that ideally you could customize your editor in realtime, rather than having to save your preferences and refresh.
Proposed solution
Introduce a "CodeMirror preferences" panel, akin to the one seen in CodeEditor with the ⌃+, keystroke. Here we could house all the advanced features, most of which will probably be off by default.
Turning CodeMirror on/off by itself should still be done either via the toggles shown in WikiEditor (2010) and VisualEditor-MediaWiki-2017WikitextEditor.
Relevant links: