You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As of ktfmt version 0.52 in IntelliJ, users can select "Custom" under "Code style," which provides the ability to customize certain formatting options. One significant feature seen in this version is the ability to manage trailing commas.
Feature Request
I would like to have this functionality available in the ktfmt pre-commit hooks as well. It would be beneficial for users to be able to enable or disable trailing commas during the pre-commit checks, providing more flexibility and adherence to varying code style preferences.
Additionally, it would be great to set a base configuration for the custom style using one of the predefined styles such as Meta, Google, or kotlinlang.
Inquiry
Is there any plan to update the pre-commit hooks to include this feature? If not, could this be considered for future updates?
Thank you for considering this enhancement to ktfmt pre-commit hooks.
The text was updated successfully, but these errors were encountered:
I'm generally of the opinion that a good formatting tool (especially if embedded in pre-commits) should be very strict in terms on how many features to expose.
At the same time ktfmt supports already code styles (even if meta is not included yet).
I think it would be fair to expose a configuration toggle to allow trailing comma.
For what concerns exposing meta style, I think that we could allow it (but we would need to make sure that we gate for a min ktfmt version).
I won't be able to promise a realistic timeline on when I could be working on this, but PR are welcome.
If you have some time and you are interested on implementing this feature, please go ahead and create a PR, I'll be happy to review.
Feature Description
As of
ktfmt
version 0.52 in IntelliJ, users can select "Custom" under "Code style," which provides the ability to customize certain formatting options. One significant feature seen in this version is the ability to manage trailing commas.Feature Request
I would like to have this functionality available in the
ktfmt
pre-commit hooks as well. It would be beneficial for users to be able to enable or disable trailing commas during the pre-commit checks, providing more flexibility and adherence to varying code style preferences.Additionally, it would be great to set a base configuration for the custom style using one of the predefined styles such as Meta, Google, or kotlinlang.
Inquiry
Is there any plan to update the pre-commit hooks to include this feature? If not, could this be considered for future updates?
Thank you for considering this enhancement to
ktfmt
pre-commit hooks.The text was updated successfully, but these errors were encountered: