I'm writing an IntelliJ plugin.
One of the functionalities should be a brace matcher. I already did the plugin tutorial from JetBrains. And I also got the brace matcher working with this regular expression [^@\*\{\}\(\)\$\.]*
so everything is matched by the lexer except these characters. So that the brace matcher can work.
But now I've got a new problem.
Some code specific parts are splitted. So everytime when there is {
or }
the code gets splitted.
This is a big problem for JavaScript because the formatter destroys the code.
My question is: How do I get the brace matcher working and keep the right formatting of JavaScript?