-
I use this new upstream API vim.api.nvim_create_autocmd({ 'InsertEnter' }, {
group = curfile_augroup,
callback = function ()
if vim.bo.buftype ~= '' then return end
if vim.bo.filetype:match('git.*') then return end
if #vim.lsp.get_clients({ bufnr=0, 'textDocument/inlayHint' }) > 0 then
vim.lsp.inlay_hint(0, true)
end
end,
})
vim.api.nvim_create_autocmd({ 'InsertLeave' }, {
group = curfile_augroup,
callback = function ()
if vim.bo.buftype ~= '' then return end
if vim.bo.filetype:match('git.*') then return end
if #vim.lsp.get_clients({ bufnr=0, 'textDocument/inlayHint' }) > 0 then
vim.defer_fn(function ()
vim.lsp.inlay_hint(0, false)
end, 300)
end
end,
}) and I got this error with
Does anyone know what I did wrong? I have added |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
You're not setting the E.g: |
Beta Was this translation helpful? Give feedback.
-
The same is happening with me When I try to go to a function implementation it says |
Beta Was this translation helpful? Give feedback.
You're not setting the
method
key in the table.E.g:
vim.lsp.get_clients({bufnr=0, method="textDocument/inlayHint"})
.