In a codemirror based editor, I’m asked to include a “right gutter”.
those that don’t see what I’m talking about, this kind of gutter shows
the whole file instead of the lines in the viewport (scaling the whole
file to the editor height).
Clicking somewhere on the
right gutter scrolls you to the matching zone, and all annotations in
the file are shown on it (in smaller form).
Is that possible with codemirror? How would it be done ?
This does not currently exist, but it should be possible to build it. Just, for huge documents, it’s going to be expensive to render (which you could probably kludge around too, by rending to a canvas and caching parts of your minimap).
Yes, I may be able to create it by taking example on annotatescrollbar which I just discovered.
I’m not overly concerned about huge documents, we have many other bottlenecks that will be a problem before we begin to render. But I will keep this warning in mind anyway.