fix: replace deprecated LSP client method calls with colon syntax #1546
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.lua
lua/lspsaga/symbol/head.lua
lua/lspsaga/symbol/init.lua
lua/lspsaga/util.lua
lua/lspsaga/typehierarchy.lua
lua/lspsaga/codeaction/init.lua
lua/lspsaga/callhierarchy.lua
lua/lspsaga/implement/init.lua
Background
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