mirror of
https://github.com/Baipyrus/nvim-config.git
synced 2024-12-25 12:51:45 +00:00
Enable inlay hints for the supporting servers (#843)
This commit is contained in:
parent
6d6b3f38c1
commit
5540527fab
11
init.lua
11
init.lua
@ -286,6 +286,7 @@ require('lazy').setup({
|
|||||||
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
['<leader>r'] = { name = '[R]ename', _ = 'which_key_ignore' },
|
||||||
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
['<leader>s'] = { name = '[S]earch', _ = 'which_key_ignore' },
|
||||||
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
['<leader>w'] = { name = '[W]orkspace', _ = 'which_key_ignore' },
|
||||||
|
['<leader>t'] = { name = '[T]oggle', _ = 'which_key_ignore' },
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
},
|
},
|
||||||
@ -518,6 +519,16 @@ require('lazy').setup({
|
|||||||
callback = vim.lsp.buf.clear_references,
|
callback = vim.lsp.buf.clear_references,
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- The following autocommand is used to enable inlay hints in your
|
||||||
|
-- code, if the language server you are using supports them
|
||||||
|
--
|
||||||
|
-- This may be unwanted, since they displace some of your code
|
||||||
|
if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then
|
||||||
|
map('<leader>th', function()
|
||||||
|
vim.lsp.inlay_hint.enable(0, not vim.lsp.inlay_hint.is_enabled())
|
||||||
|
end, '[T]oggle Inlay [H]ints')
|
||||||
|
end
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user