How to contribute new modes to CodeMirror?

Hi,

Sorry if it’s not the correct place to post but it’s my first time here.

In our company we’re using Gerrit to do code review and Gerrit uses CodeMirror to show the code differences. We are interested in having syntax highlighting for some languages we use internally that are not included in the last CodeMirror version. We’ve already coded and tested the .js mode files following the manual instructions (http://codemirror.net/doc/manual.html#modeapi). Right now, we have made a change to the Gerrit code to load these modes but it would be cleaner if they are included in CodeMirror. It is possible to contribute these language modes to CodeMirror? If so, what’s the procedure to follow? By the way, the languages are TTCN (Testing and Test Control Notation) and ANS.1 (Abstract Syntax Notation One).

Thanks

The preferred procedure is to open a pull request on Github. Please make
sure the linter (bin/lint in the distribution) passes and that you’re
roughly following the project’s code style (see CONTRIBUTING.md). Also,
modes are not supposed to come with a css file, but rather they should use
common token names so that all themes can be applied to them.