space + i for toggle inlay hints

This commit is contained in:
Oliver Hartmann 2024-05-20 21:48:49 +02:00
parent 68562ea1be
commit 638293d7a8

View File

@ -51,6 +51,17 @@ local lspKeys = function(client, bufnr)
end,
{ noremap = true, silent = false, desc = 'Format visual', buffer = bufnr })
end
if client.supports_method('inlayHintProvider') then
vim.keymap.set('n', '<space>i', function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = bufnr }), { bufnr = bufnr })
end,
{
noremap = true,
silent = false,
desc = 'Toggle inlay hints',
buffer = bufnr
})
end
end
local document_highlight = function(bufnr)