Page MenuHomePhabricator

Add "no syntax highlighting" as an available theme within CodeMirror
Open, In Progress, Needs TriagePublic

Description

See T418352 for discussion that prompted this.

CodeMirror is first and foremost a syntax highlighter. But it is in fact a proper editor, and the highlighting itself doesn't strictly need to be visible for other fancy features to work. For some, the parser will need to be there to do its job, e.g., code folding and bracket matching. Other features like line numbering or highlighting the active line don't need the parser at all.

After discussion, we've decided to offer the ability to disable highlighting entirely as a theme (T163533). That way, all other features will still work.

Event Timeline

"No syntax highlighting" is essentially a new theme (T163533) which does not style any tokens. We still need the parser tree for various other extensions.

Agreed, that sounds like the simplest way forward.

MusikAnimal renamed this task from Make syntax highlighting its own preference within CodeMirror to Add "no syntax highlighting" as an available theme within CodeMirror.Mar 23 2026, 10:14 PM
MusikAnimal updated the task description. (Show Details)

Change #1277806 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CodeMirror@master] [WIP] Add themes to preferences, and support for non-boolean prefs

https://gerrit.wikimedia.org/r/1277806

MusikAnimal changed the task status from Open to In Progress.Apr 28 2026, 12:52 AM
MusikAnimal claimed this task.

Change #1277806 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/CodeMirror@master] CodeMirrorThemes: add themes to preferences in a new Appearance section

https://gerrit.wikimedia.org/r/1277806