folding-nvim
folding-nvim copied to clipboard
Fix `fold_handler` method signature
Corrects the fold_handler
LSP handler signature to conform with a
breaking NeoVim nightly update. This closes pierreglaser/folding-nvim#5
by ensuring LSP results and buffer numbers are correctly gathered from
arguments.
Thanks for the patch! Is there an easy way to remain backward-compatible with neovim versions preceding this change?
Has enough time passed that we can switch to this despite it not being backwards-compatible?
Hey @pierreglaser, I concur with @ElPiloto that we should merge this.
Thanks for the patch! Is there an easy way to remain backward-compatible with neovim versions preceding this change?
It should be possible to detect the neovim version to do this. Not the best idea since feature detection is always more reliable than version detection, but that's the only way I can think of.
@ElPiloto @ajitid wasn't this resolved by 5d2b3d98c47c8c16aade06ebfd411bc74ad6d205?
I don't remember, really. I look at the diff and the made the change in my own fork: https://github.com/ajitid/folding-nvim/commit/71e46d26e6ba83079cd7ddd4e95bec7942c670c9. Seems like the change results in completely skipping inner if condition.
Unrelated, but another change I made is to only attach to those clients into which I've specified https://github.com/ajitid/folding-nvim/commit/6de3bb50b2f65d33d327a08269ba34f841e80cfa. This reduces the nagging on upon opening each file.
Unrelated, but another change I made is to only attach to those clients into which I've specified https://github.com/ajitid/folding-nvim/commit/6de3bb50b2f65d33d327a08269ba34f841e80cfa. This reduces the nagging on upon opening each file.
Ah, I agree, being able to specify which client
folding-nvim
should ask folds to would be nice to have. PR welcome!
I'm closing this for now (see https://github.com/pierreglaser/folding-nvim/pull/6#issuecomment-1501900765), but feel free to re-open if I missed something.