Closed flosacca closed 1 year ago
Hey, thanks for your contribution! This looks like a cool idea, however, I'd need some time to review - so please bear with me for a while.
As this plugin was recently integrated into Vim upstream; not sure if it makes sense to open up something there, but they are very active and far more experienced with Vim plugins than I am - so it might be worth a shot?
OK. I've also opened a PR in Vim upstream.
I prefer the maintainer to send updates to me. That avoids having differences and not knowing whether they are intentional or not.
Sounds reasonable. I've closed the PR in Vim upstream.
@chr4 This PR definitely fixes the issues with nginx indentation: https://github.com/chr4/nginx.vim/issues/3.
setlocal smartindent
in indent/nginx.vim
as suggested by you fixes it partially but messes other indentation up, so this PR is the best solution so far and it works like a charm.
Could you merge it? Thanks!
Sorry everyone, I totally forgot about reviewing this.
It definitly works. The custom function adds some overhead, but I think it's worth it.
Re-created PR on vim upstream
There were a few suggestions in the upstream merge request.
any thoughts?
In indent files bundled with Vim 8.2, both :function
and :function!
are widely used, so I don't think it matters which one you use. If one is preferred, feel free to modify the code.
I also have little interest in the new syntax of Vim 9, for compatibility reasons.
To fix #3, I rewrote the indent script, which replaces
cindent
withindentexpr
. Hope it helps.