indent-heuristic
that copies the leading whitespace from the previous line verbatim (instead of matching with tabs)
#11951
Labels
C-enhancement
Category: Improvements
There is a little gripe I have with
indent-heuristic = simple
while using the "tabs to indent, spaces to align" styling. For C functions, when parameters are long, I tend to do it like this:With
indent = { tab-width = 8, unit = "\t" }
, when I add a new line to the parameters, Helix matches the previous indent by putting as many tabs as can fit, then padding the rest with spaces, like so (with.
being spaces,<------>
being tabs):It would be nice to have an
indent-heuristic
that simply copies the same exact whitespace onto the new line instead - where there are all tabs, copy tabs; where there are all spaces, copy spaces; if there is some weird mixture, just copy the mixture - i.e. to be even less clever about it.If there is interest, I am willing to author a PR for this, be it by adding a new special heuristic, or changing the existing
simple
one.The text was updated successfully, but these errors were encountered: