Skip to content

Commit 9386ed4

Browse files
bigduumehalter
authored andcommitted
fix: lsp inlay hint API change.
1 parent 2ac3632 commit 9386ed4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lua/astrolsp/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ M.on_attach = function(client, bufnr)
8585
if client.supports_method "textDocument/inlayHint" then
8686
if vim.b[bufnr].inlay_hints == nil then vim.b[bufnr].inlay_hints = M.config.features.inlay_hints end
8787
-- TODO: remove check after dropping support for Neovim v0.9
88-
if vim.lsp.inlay_hint and vim.b[bufnr].inlay_hints then vim.lsp.inlay_hint.enable(bufnr, true) end
88+
if vim.lsp.inlay_hint and vim.b[bufnr].inlay_hints then vim.lsp.inlay_hint.enable(true, { bufnr = bufnr }) end
8989
end
9090

9191
if client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens then

lua/astrolsp/toggles.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function M.buffer_inlay_hints(bufnr, silent)
4545
vim.b[bufnr].inlay_hints = not vim.b[bufnr].inlay_hints
4646
-- TODO: remove check after dropping support for Neovim v0.9
4747
if vim.lsp.inlay_hint then
48-
vim.lsp.inlay_hint.enable(bufnr, vim.b[bufnr].inlay_hints)
48+
vim.lsp.inlay_hint.enable(vim.b[bufnr].inlay_hints, { bufnr = bufnr })
4949
ui_notify(silent, ("Inlay hints %s"):format(bool2str(vim.b[bufnr].inlay_hints)))
5050
end
5151
end

0 commit comments

Comments
 (0)