You've got a JetBrains IDE working with OCaml? What plugin are you using with which IDE? The only plugin[1] I've seen seems to be 7 years out of date.
[1]: https://plugins.jetbrains.com/plugin/4986-ocaml-support
[1]: https://plugins.jetbrains.com/plugin/4986-ocaml-support
Amusingly someone made a plugin for pg's Arc 3.1 code back in '08: https://i.imgur.com/Xe7mvIB.png
If IDEA doesn't support a particular language, it's pretty easy to fork an existing plugin and throw together some lexer rules.