florianschanda / miss_hit

MATLAB Independent, Small & Safe, High Integrity Tools - code formatter and more
GNU General Public License v3.0
158 stars 21 forks source link

Support single-level indentation after opening delimiter (similar to PEP-8) #284

Open flixha opened 8 months ago

flixha commented 8 months ago

Thanks a lot for developing mh_style!

What kind of feature is this?

Your MATLAB/Octave environment

MISS_HIT component affected

Describe the solution you'd like It would be nice if it could support indentation style similar to PEP-8 concerning e.g., function definitions and calls, allowing to:

Currently accepted style Currently, mh_style only accepts the following styles, which doesn't help much with limiting the length of lines:

foo = package.TopClass.long_function_name( ...
                                          var_one, var_two, var_three, var_four)
foo = ...
    package.TopClass.long_function_name(var_one, var_two, ...
                                        var_three, var_four)
florianschanda commented 7 months ago

Sounds like an interesting idea. It's been a while since I touched the indent code so not sure how easy it'll be but I'll see what can be done.