fix(rename): use colon syntax for LSP client methods and update get_clients#2769
fix(rename): use colon syntax for LSP client methods and update get_clients#2769lgick wants to merge 2 commits intofolke:mainfrom
Conversation
|
This is a breaking change and will drop support for Neovim versions <0.11. No idea until which version maintainer wants to support. Current supported version is 0.9.4 according to README. But an alternative would be to export snacks.nvim/lua/snacks/picker/source/lsp/init.lua Lines 37 to 64 in a049339 snacks/util/init.lua and then use that. Also I do not get any deprecation warnings about vim.lsp.get_active_clients() in checkhealth. Only inline diagnostics in the file itself, but that should not be really a problem since it depends on the Neovim version you have installed.
|
|
Done! I exported the existing wrap function from picker/source/lsp/init.lua into snacks/util/init.lua as you suggested, and updated both picker and rename to use Snacks.util.wrap. Also reverted the get_clients fallback for Neovim 0.9 compatibility. |
|
Please do note i'm just a simple user and under no circumstances do i make decisions in this project. My previous comment was more like a suggestion/note. Maybe the maintainer would be in favor of dropping support for Neovim <0.11. I've literally no idea. He's the one with final say and make final decision. |
|
Thanks for the suggestion, it was helpful 🤝 |
Description
This PR fixes deprecation warnings appearing in Neovim nightly (0.11+) when renaming files.
Changes:
client.supports_method,client.request_sync, andclient.notifywith the method call syntaxclient:method(...).vim.lsp.get_active_clients()withvim.lsp.get_clients().These changes align with the latest Neovim LSP API requirements.
Related Issue(s)
Fixes deprecation warnings reported by
:checkhealth.Screenshots
N/A (LSP API update)