For gq to be meaningful, CodeMirror needs to have some idea of how a file should be formatted. Right now, CodeMirror has some notion of how far code should be indented. It doesn't understand how code or text should break. It doesn't understand how comments should be break. I don't believe these concepts make sense in the context of an editing component either.
So I don't think this is a feature that makes sense to add to CodeMirror. That said, VIM mode has documented APIs for extending it in the environment it's used.
I think its already enough if it just breaks. For example I use this functionality in LaTeX and it would make sense IMHO because tools like Overleaf could benefit from it!
I think that since many downstream services use CodeMirror as a Vim emulator, it would make sense to implement at least a rudimentary version of this. Even if it just wraps lines, that would be useful.
Most helpful comment
I think that since many downstream services use CodeMirror as a Vim emulator, it would make sense to implement at least a rudimentary version of this. Even if it just wraps lines, that would be useful.