Closed lelutin closed 5 years ago
@lelutin This is awesome, thanks! Would you mind writing up some quick vader tests for the auto indentation functionality so that we can ensure this doesn't break in the future?
@rodjek sure I can give it a try. I'll get back to you when I have something
@rodjek I've added tests for the cases covered in this pull request.
I'm having an issue with one of the tests though... indentation doesn't have access to syntax ID during the test and because of that indentation doesn't behave the same.
I don't know how to fix this :\
@rodjek do you have an idea how the test I wrote that's broken could be made to run well with vader? since the fix for indentation is relying on syntax class, but the vader test apparently can't access the syntax class I can't make this work out :S
I still haven't figured out how I can actually manage to fix the vader test that I wrote. since the syntax class is not available during the test, we cannot possibly test the current workings of the previous fixes on this branch :\
@rodjek wow! you rock! thanks
This patch series should fix the bug reports that are currently reported plus a couple other indentation bugs that I've discovered right after fixing the second bug:
99 : superfluous indentation for a resource param named "include"
20 and #24 (duplicates) : indentation decrement not happening after a comment line
With all of those changes I'm now able to automatically indent a horrendous 7.9k-line file automatically with
gg=G
without any issues on indentation!