Skip to content

Commit b8daf3d

Browse files
committed
fix: update inlay hints API
1 parent 0fc5bf0 commit b8daf3d

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
@@ -173,7 +173,7 @@ M.on_attach = function(client, bufnr)
173173
if client.supports_method "textDocument/inlayHint" then
174174
if vim.b[bufnr].inlay_hints == nil then vim.b[bufnr].inlay_hints = M.config.features.inlay_hints end
175175
-- TODO: remove check after dropping support for Neovim v0.9
176-
if vim.lsp.inlay_hint and vim.b[bufnr].inlay_hints then vim.lsp.inlay_hint(bufnr, true) end
176+
if vim.lsp.inlay_hint and vim.b[bufnr].inlay_hints then vim.lsp.inlay_hint.enable(bufnr, true) end
177177
end
178178

179179
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
@@ -40,7 +40,7 @@ function M.buffer_inlay_hints(bufnr, silent)
4040
vim.b[bufnr].inlay_hints = not vim.b[bufnr].inlay_hints
4141
-- TODO: remove check after dropping support for Neovim v0.9
4242
if vim.lsp.inlay_hint then
43-
vim.lsp.inlay_hint(bufnr, vim.b[bufnr].inlay_hints)
43+
vim.lsp.inlay_hint.enable(bufnr, vim.b[bufnr].inlay_hints)
4444
ui_notify(silent, string.format("Inlay hints %s", bool2str(vim.b[bufnr].inlay_hints)))
4545
end
4646
end

0 commit comments

Comments
 (0)