lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

fix: handle breaking change to vim.api.nvim_win_get_config (#1397)

Open scratchyone opened this issue 1 year ago • 3 comments

This PR fixes #1397, and adds support for the NVIM v0.10.0 nvim_win_get_config() API change.

It prioritizes the new API by making it the default and turning the return values into the v0.10.0 format if the user is running an older version of NVIM.

I've tested this locally and it fixes all the issues with code actions for me on NVIM v0.10.0-dev-2393+g93c911e52-Homebrew .

scratchyone avatar Feb 24 '24 23:02 scratchyone

there has util is_ten as condtion i do some check in layout you can check it.

glepnir avatar Feb 25 '24 06:02 glepnir

there has util is_ten as condtion i do some check in layout you can check it.

I noticed that helper function while I was reviewing the rest of the codebase for any other possible v0.10.0-related bugs. However, I was worried about future-proofness because it appears to only check the minor version. That approach might not work properly if/when NVIM goes to version 1.0, which is why I decided to check the data-type instead. However, if you'd rather me update the commit to use the is_ten function I'd be happy to do that.

scratchyone avatar Feb 26 '24 00:02 scratchyone

in nightly the return type lua convert is fixed so when 0.10 released i decide remove support for 0.9* so we can just use nvim_win_get_config().col/row directly.

glepnir avatar Feb 26 '24 07:02 glepnir