fix(rename, words): use colon-notation for LSP client methods (closes #2839)#2862
Open
Booyaka101 wants to merge 1 commit into
Open
fix(rename, words): use colon-notation for LSP client methods (closes #2839)#2862Booyaka101 wants to merge 1 commit into
Booyaka101 wants to merge 1 commit into
Conversation
`client.supports_method`, `client.request_sync`, and `client.notify` are deprecated in Neovim 0.11+ and slated for removal in 0.13. Convert the four call sites in `snacks/rename.lua` and the one in `snacks/words.lua` to colon-notation, which works on every Neovim version snacks supports and avoids the deprecation warnings users see in the wild. Closes folke#2839
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
`client.supports_method`, `client.request_sync`, and `client.notify` are deprecated in Neovim 0.11+ and slated for removal in 0.13. Users see the warning in the wild — #2839 includes the stack traceback from `rename.lua`.
Convert the four call sites in `snacks/rename.lua` (lines 97, 98, 110, 111) and the one in `snacks/words.lua` (line 116) to colon-notation. This matches what `snacks/picker/source/lsp/init.lua:94,204` already does, so the change brings the two stragglers in line with the rest of the codebase.
Related Issue(s)
rename.luauses deprecated client.request_sync and client.supports_method (dot notation) #2839Verification
Headless mock-client test confirms `rename.on_rename_file` dispatches `supports_method` / `request_sync` / `supports_method` / `notify` in order with no errors under colon-notation. `words.lua` change is the same syntax-equivalent transformation on a structurally identical call.