Inlay hints for Neovim 0.10.0

This commit is contained in:
Vladislav 2024-04-13 19:15:26 +02:00
parent 4f450498be
commit 3f1c1e6c38
No known key found for this signature in database
GPG Key ID: 07A1CCBD643CA257
1 changed files with 10 additions and 0 deletions

View File

@ -2,4 +2,14 @@
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
vim.api.nvim_create_autocmd('LspAttach', {
group = vim.api.nvim_create_augroup('UserLspConfig', {}),
callback = function(args)
local client = vim.lsp.get_client_by_id(args.data.client_id)
if client and client.server_capabilities.inlayHintProvider then
vim.lsp.inlay_hint.enable(args.buf, true)
end
-- whatever other lsp config you want
end,
})
return {}