Overriding ctrl alt l for formatting

I want to override the default formatting shortcut for a custom language. The formatting is acutally done through an external process, so I want to launch a process when the formatting happens.  I don't wish to create an extension of lang.formatter which needs a FormattingModelBuilder. Is there any way to do so.

Thanks

1 comment
Comment actions Permalink

lang.formatter is called in many different situations, not just when Ctrl-Alt-L is pressed (for example, it's called to reformat code during refactoring operations, and for positioning the caret when the Enter key is pressed). Therefore, if you want the users of your plugin to have a good experience, you should consider providing a proper implementation of lang.formatter, and not just replacing the behavior of Ctrl-Alt-L.

0

Please sign in to leave a comment.