get_clients for 0.10 get_active_clients for 0.9.x

This commit is contained in:
ray-x 2023-11-08 15:18:13 +11:00
parent 5cf1459e03
commit 236fb062d2

View File

@ -226,6 +226,9 @@ end
-- a function from smjonas/inc-rename.nvim
-- https://github.com/smjonas/inc-rename.nvim/blob/main/lua/inc_rename/init.lua
local function fetch_lsp_references(bufnr, params, callback)
if not vim.lsp.get_clients then
vim.lsp.get_clients = vim.lsp.get_active_clients
end
local clients = vim.lsp.get_clients({
bufnr = bufnr,
})