folding-nvim icon indicating copy to clipboard operation
folding-nvim copied to clipboard

Fix `fold_handler` method signature

Open Nicholas-Hein opened this issue 3 years ago • 2 comments

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.

Nicholas-Hein avatar Oct 15 '21 03:10 Nicholas-Hein

Thanks for the patch! Is there an easy way to remain backward-compatible with neovim versions preceding this change?

pierreglaser avatar Oct 17 '21 14:10 pierreglaser

Has enough time passed that we can switch to this despite it not being backwards-compatible?

ElPiloto avatar May 11 '22 14:05 ElPiloto

Hey @pierreglaser, I concur with @ElPiloto that we should merge this.

ajitid avatar Mar 04 '23 05:03 ajitid

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.

Lazerbeak12345 avatar Apr 09 '23 00:04 Lazerbeak12345

@ElPiloto @ajitid wasn't this resolved by 5d2b3d98c47c8c16aade06ebfd411bc74ad6d205?

pierreglaser avatar Apr 10 '23 14:04 pierreglaser

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.

ajitid avatar Apr 10 '23 14:04 ajitid

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!

pierreglaser avatar Apr 10 '23 16:04 pierreglaser

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.

pierreglaser avatar Apr 10 '23 16:04 pierreglaser