Skip to content

fix(rename, words): use colon-notation for LSP client methods (closes #2839)#2862

Open
Booyaka101 wants to merge 1 commit into
folke:mainfrom
Booyaka101:fix/lsp-client-deprecated-dot-notation
Open

fix(rename, words): use colon-notation for LSP client methods (closes #2839)#2862
Booyaka101 wants to merge 1 commit into
folke:mainfrom
Booyaka101:fix/lsp-client-deprecated-dot-notation

Conversation

@Booyaka101
Copy link
Copy Markdown

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)

Verification

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.

`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
@github-actions github-actions Bot added words rename size/m Medium PR (<50 lines changed) labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rename size/m Medium PR (<50 lines changed) words

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: rename.lua uses deprecated client.request_sync and client.supports_method (dot notation)

1 participant