Detect if using nvim 0.10 and use new inlay_hint.enable method

This commit is contained in:
Gary Murray 2023-11-13 09:39:08 -07:00
parent 68ff818a5b
commit bd4668737d

View file

@ -120,7 +120,11 @@ return {
if opts.inlay_hints.enabled and inlay_hint then
Util.lsp.on_attach(function(client, buffer)
if client.supports_method("textDocument/inlayHint") then
inlay_hint(buffer, true)
if vim.fn.has("nvim-0.10") == 1 then
inlay_hint.enable(buffer, true)
else
inlay_hint(buffer, true)
end
end
end)
end