Skip to content

Commit fe91aad

Browse files
committed
fix(lsp): update function call that is deprecated in nightly
1 parent 6b7e0e1 commit fe91aad

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lua/rustaceanvim/server_status.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,9 @@ see ':h rustaceanvim.lsp.ClientOpts'.
4848
-- [https://github.com/neovim/neovim/issues/26511]
4949
-- This workaround forces Neovim to redraw inlay hints if they are enabled,
5050
-- as soon as rust-analyzer has fully initialized.
51-
if type(vim.lsp.inlay_hint) == 'table' then
52-
for _, bufnr in ipairs(vim.lsp.get_buffers_by_client_id(ctx.client_id)) do
51+
local client = vim.lsp.get_client_by_id(ctx.client_id)
52+
if client and type(vim.lsp.inlay_hint) == 'table' then
53+
for bufnr, _ in pairs(client.attached_buffers) do
5354
if vim.lsp.inlay_hint.is_enabled { bufnr = bufnr } then
5455
vim.lsp.inlay_hint.enable(false, { bufnr = bufnr })
5556
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })

0 commit comments

Comments
 (0)