Requested at https://www.mediawiki.org/wiki/Help_talk:Extension:CodeMirror#Feedback_from_Wikisource_user :
I would also like to request a feature that might be useful for languages that use Cyrillic script. In Ukrainian alphabet there are a lot of letter that look identical to the Latin one (а & a; і & i; с & c etc.) and it is quite a hassle for Wikisource editors to deal with mix of these scripts in books. Would it be possible to have user set a list of characters that would be highlighted in the wikieditor? Currently, there are already some gadgets on Ukrainian Wikisource that do the highlighting of Latin characters, but they can only do that while viewing page, not during the editing.
After discussion, it sounds like this would be easiest to implement with a new JS entrypoint to add a custom linter. Then each wiki and individual users can create a gadget or user script specific to their needs.