To do so, I forked @codemirror/gutter and modified ‘lineNumberGutter’ and ‘NumberMarker’ to add a new elementClass (‘cm-activeLineNumber’) to the GutterMarker when ‘number’ match the active line number.
Is there any other way to do that ?
I would prefer to work on top of @codemirror/gutter so I don’t have to maintain my own version of it.
I initially had intended lineNumberMarkers to be used for something like this, but trying to actually set up an example I found that that doesn’t really work at all (it only affects the line number gutter, not other gutters, and hides the line number on the active line). So I’ve made some changes to the gutters package to add a gutterLineClass facet that can be used to style all gutter elements for a given line, and a convenience highlightActiveLineGutter exension that does what you need here.