jcberquist / commandbox-cfformat

A CommandBox module for formatting CFML component files.
MIT License
22 stars 10 forks source link

Separator for function arguments #109

Open bockensm opened 3 years ago

bockensm commented 3 years ago

There is currently a setting for struct.separator. Can we have the same for function call arguments? I would like to be able to format named arguments with one of the same options from struct.separator.

Example:

myUDF( p="arg1", z: "arg2" );

Would become consistent as:

myUDF( p: "arg1", z: "arg2" );
jcberquist commented 3 years ago

This makes sense to me as a request, and should be doable, but it isn’t backward compatible as right now I believe the spacing around the = is governed by the binary_operators.padding setting. Implementing this would break that connection. It might make still make sense to do this, but I have to keep that in mind, as it will affect everyone’s formatting.