fix(lsp): stop using deprecated client.supports_method function (#3468)
Some checks failed
Tests / unit tests (brew update && brew install ripgrep, macos-latest, nightly) (push) Has been cancelled
Tests / unit tests (brew update && brew install ripgrep, macos-latest, v0.10.0) (push) Has been cancelled
Tests / unit tests (brew update && brew install ripgrep, macos-latest, v0.9.5) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, nightly) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, v0.10.0) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, v0.9.5) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, nightly) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, v0.10.0) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, v0.9.5) (push) Has been cancelled
Linting and style checking / Luacheck (push) Has been cancelled
Linting and style checking / stylua (push) Has been cancelled
Some checks failed
Tests / unit tests (brew update && brew install ripgrep, macos-latest, nightly) (push) Has been cancelled
Tests / unit tests (brew update && brew install ripgrep, macos-latest, v0.10.0) (push) Has been cancelled
Tests / unit tests (brew update && brew install ripgrep, macos-latest, v0.9.5) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, nightly) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, v0.10.0) (push) Has been cancelled
Tests / unit tests (choco install ripgrep, windows-2022, v0.9.5) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, nightly) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, v0.10.0) (push) Has been cancelled
Tests / unit tests (sudo apt-get update && sudo apt-get install -y ripgrep, ubuntu-22.04, v0.9.5) (push) Has been cancelled
Linting and style checking / Luacheck (push) Has been cancelled
Linting and style checking / stylua (push) Has been cancelled
This commit is contained in:
@@ -506,10 +506,16 @@ local function check_capabilities(method, bufnr)
|
||||
local clients = get_clients { bufnr = bufnr }
|
||||
|
||||
for _, client in pairs(clients) do
|
||||
if vim.fn.has "nvim-0.11" == 1 then
|
||||
if client:supports_method(method, bufnr) then
|
||||
return true
|
||||
end
|
||||
else
|
||||
if client.supports_method(method, { bufnr = bufnr }) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if #clients == 0 then
|
||||
utils.notify("builtin.lsp_*", {
|
||||
|
||||
Reference in New Issue
Block a user