rodjek / vim-puppet

Puppet niceties for your Vim setup
Apache License 2.0
500 stars 137 forks source link

Indentation errors #100

Closed lelutin closed 5 years ago

lelutin commented 5 years ago

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:

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!

rodjek commented 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?

lelutin commented 5 years ago

@rodjek sure I can give it a try. I'll get back to you when I have something

lelutin commented 5 years ago

@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 :\

lelutin commented 5 years ago

@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

lelutin commented 5 years ago

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 :\

lelutin commented 5 years ago

@rodjek wow! you rock! thanks