Visual D issues and suggestions
Laurent Tréguier
laurent.treguier.sink at gmail.com
Wed Oct 24 09:11:26 UTC 2018
On Wednesday, 24 October 2018 at 06:59:39 UTC, Rainer Schuetze
wrote:
> Thanks for the hint. I guess the diff only works if the rest of
> the code is already formatted according to the dfmt rules?
No, it works even if the rest of the code isn't properly
formatted. This is why I'm using diffs: the extension knows what
to change, and where, but all of the changes are independent, so
you can apply whichever you want regardless of the rest to format
a specific region of the code only.
> Visual D only changes indentation so far, no reflow with
> insertion or removal of line breaks. IMO all reformatting tools
> produce strange results, including clang-format, so I usually
> avoid these. I'm still on the fence whether an integration of
> dfmt would be a good thing...
That's for sure, there are a lot of weird results with dfmt
(https://github.com/dlang-community/dfmt/issues/254 comes to my
mind). It could be added as an option in Visual D's settings,
while keeping the current re-indentation as the default
formatting action.
More information about the Digitalmars-d-ide
mailing list