Skip to content

Commit

Permalink
for_each_buffer_client deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
ray-x committed May 21, 2024
1 parent 1c68f33 commit d3c7e03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/navigator/definition.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ local def = function()
local bufnr = vim.api.nvim_get_current_buf()

local ref_params = vim.lsp.util.make_position_params()
vim.lsp.for_each_buffer_client(bufnr, function(client, _, _bufnr)
util.for_each_buffer_client(bufnr, function(client, _, _bufnr)
-- if client.resolved_capabilities.goto_definition then
if client.server_capabilities.definitionProvider then
client.request('textDocument/definition', ref_params, definition_hdlr, _bufnr)
Expand Down
2 changes: 1 addition & 1 deletion lua/navigator/reference.lua
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ local ref = function()
local bufnr = vim.api.nvim_get_current_buf()

local ref_params = vim.lsp.util.make_position_params()
vim.lsp.for_each_buffer_client(bufnr, function(client, _, _)
util.for_each_buffer_client(bufnr, function(client, _, _)
if client.server_capabilities.referencesProvider then
client.request('textDocument/references', ref_params, ref_hdlr, bufnr)
end
Expand Down

0 comments on commit d3c7e03

Please sign in to comment.