IntelliJ has a custom process for running optimize imports action.
This process can be triggerred as a pre-commit action. The problem arises when IntelliJ imports optimizer behaves differently comparing to what Java formatting plugin can do.
As a solution I'm adding a hook for optimize imports action. Dprint core is language agnostic and does not support a special message like "optimize imports". Therefore, I'm invoking plain format action assuming that underlying formatter will do imports optimization on it's own.
Open question: should I add a checkbox to the IJ plugin settings which will enable/disable Imports optimizer?
IntelliJ has a custom process for running optimize imports action. This process can be triggerred as a pre-commit action. The problem arises when IntelliJ imports optimizer behaves differently comparing to what Java formatting plugin can do.
As a solution I'm adding a hook for optimize imports action. Dprint core is language agnostic and does not support a special message like "optimize imports". Therefore, I'm invoking plain format action assuming that underlying formatter will do imports optimization on it's own.
Open question: should I add a checkbox to the IJ plugin settings which will enable/disable Imports optimizer?