fix: replace deprecated LSP client method calls with colon syntax#1546
Open
leeguooooo wants to merge 3 commits intonvimdev:mainfrom
Open
fix: replace deprecated LSP client method calls with colon syntax#1546leeguooooo wants to merge 3 commits intonvimdev:mainfrom
leeguooooo wants to merge 3 commits intonvimdev:mainfrom
Conversation
4fecd20 to
62efbee
Compare
Contributor
|
any news on this? would be nice to get rid of the deprecation warnings every time i boot nvim @glepnir :). the error started showing up for me when I updated nvim to 0.12 dev |
|
Same for me the error started in nightly build -- temp error with nvim.progress and nvim.lspsaga [to be updated ]
vim.deprecate = function() end |
Contributor
|
turning off deprecations warnings, defeats the entire purpose of running with neovim:master builds. |
kellerben
approved these changes
Aug 12, 2025
kellerben
left a comment
There was a problem hiding this comment.
looks good and should be merged to upstream
docwhat
approved these changes
Oct 21, 2025
|
why hasn't this been merged? |
Replaces deprecated dot notation with colon notation for LSP client methods: - client.supports_method() → client:supports_method() - client.request() → client:request() - client.request_sync() → client:request_sync() This addresses deprecation warnings in Neovim 0.11+ as documented in :help deprecated.txt Backwards compatible: Colon syntax is just Lua syntactic sugar supported since Neovim 0.5+. No functionality changes, only modernized syntax. Fixes: nvimdev#1543
62efbee to
4173557
Compare
Author
Update
Key implementationlocal function client_method_wrapper(client, name, ...)
if vim.version().minor >= 11 then
return client[name](client, ...)
end
return client[name](...)
endTouched areas
|
Contributor
|
why support 0.10 at all? Neovim stable which is available through package managers, cached repos and the likes sits at 0.11.5. |
Member
|
lint fix and only support 0.11 should be fine . |
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.
Summary
This PR fixes deprecation warnings in Neovim 0.11+ by replacing deprecated LSP client method calls with the new colon syntax.
Changes
client.supports_method()withclient:supports_method()client.request()withclient:request()client.request_sync()withclient:request_sync()Backwards Compatibility ✅
This change is fully backwards compatible and requires no version checks:
client:method()is identical toclient.method(client, ...)- just cleaner syntaxFiles Modified
lua/lspsaga/codeaction/lightbulb.lualua/lspsaga/symbol/head.lualua/lspsaga/symbol/init.lualua/lspsaga/util.lualua/lspsaga/typehierarchy.lualua/lspsaga/codeaction/init.lualua/lspsaga/callhierarchy.lualua/lspsaga/implement/init.luaBackground
In Neovim 0.11+, the LSP client API has deprecated the dot notation for client methods in favor of colon notation. This change maintains the same functionality while using the modern API and eliminates deprecation warnings like:
Test Plan
Closes #1543