nvim: lsp: inlay_hint() has been moved to vim.lsp

This commit is contained in:
Sanchayan Maity 2023-06-30 16:07:54 +05:30
parent 9465e12ad3
commit d159850db2
Signed by: sanchayanmaity
GPG key ID: 6F6A0609C12038F3

View file

@ -59,7 +59,7 @@ local lsp_key_mappings = {
{ "hoverProvider" , 'n', '<Leader>k', '<cmd>lua vim.lsp.buf.hover()<CR>' },
{ "signatureHelpProvider" , 'n', '<Leader>S', '<cmd>lua vim.lsp.buf.signature_help()<CR>' },
{ "renameProvider" , 'n', 'gR' , '<cmd>lua vim.lsp.buf.rename()<CR>' },
{ "inlayHintProvider" , 'n', 'gi' , '<cmd>lua vim.lsp.buf.inlay_hint(0, nil)<CR>' },
{ "inlayHintProvider" , 'n', 'gi' , '<cmd>lua vim.lsp.inlay_hint(0, nil)<CR>' },
{ "documentRangeFormattingProvider", 'x', 'gq', '<cmd>lua vim.lsp.buf.format({async=true})<CR>' },
{ "documentFormattingProvider" , 'n', 'gq', '<cmd>lua vim.lsp.buf.format({async=true})<CR>' },
@ -195,7 +195,7 @@ local on_attach = function(client, bufnr)
end
if client.server_capabilities.inlayHintProvider then
vim.lsp.buf.inlay_hint(bufnr, false)
vim.lsp.inlay_hint(bufnr, false)
end
end