Closed Frederick888 closed 3 years ago
@timakro Could you please review this? Thanks :)
For over a month now I was holding off on dealing with this PR because I was not sure what to do with it. The way I feel is that this change makes too many assumptions about language and code style and hurts the transparency of the algorithm.
I can't help thinking that the character lists you chose might work for C-style languages but break the plugin for some different language completely. I dislike the code style this change is targeting anyways, namely choosing a different number of spaces for "continuation indents". So my snarky response would just be: fix your code style.
It would require a significant amount of users with the same request for me to change my mind about this.
Thanks for putting thoughts into this. Unfortunately 'fixing my code style' is not an option for me.
For one they're not my personal projects; for another using wider continuation indentations, fixed or aligned with opening parentheses/braces/etc, is actually somewhat suggested:
clang-format
output at https://zed0.co.uk/clang-format-configurator/I understand it may not be very useful in your use cases. I guess for now I can simply maintain my own fork :)
Two configurations were added:
g:yadi_ignore_after_trailing
:If the preceding line of current one ends with any of the strings in this list, current line is ignored in
DetectIndent
.g:yadi_ignore_with_leading
:If current line begins with any of the strings in this list, current line is ignored in
DetectIndent
.Fixes #1.
This is an implementation of my comment at [1]. Default values for these lists should work for most C-like languages. If you don't want to change the default behaviour, I'm happy to clear out these defaults.
[1] https://github.com/timakro/vim-yadi/issues/1#issuecomment-798874367