diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 70072f9..4ffc71a 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -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', '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)