30 lines
941 B
Lua
30 lines
941 B
Lua
|
return {
|
||
|
{
|
||
|
"p00f/clangd_extensions.nvim",
|
||
|
optional = true,
|
||
|
opts = { extensions = { autoSetHints = true } },
|
||
|
init = function()
|
||
|
--load clangd extensions when clangd attaches
|
||
|
local augroup = vim.api.nvim_create_augroup("clangd_extensions", { clear = true })
|
||
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||
|
group = augroup,
|
||
|
desc = "Load clangd_extensions with clangd",
|
||
|
callback = function(args)
|
||
|
if assert(vim.lsp.get_client_by_id(args.data.client_id)).name == "clangd" then
|
||
|
require("clangd_extensions")
|
||
|
require("clangd_extensions.inlay_hints").setup_autocmd()
|
||
|
require("clangd_extensions.inlay_hints").set_inlay_hints()
|
||
|
vim.api.nvim_del_augroup_by_id(augroup)
|
||
|
end
|
||
|
end,
|
||
|
})
|
||
|
end,
|
||
|
},
|
||
|
{
|
||
|
"simrat39/rust-tools.nvim",
|
||
|
optional = true,
|
||
|
opts = { tools = { inlay_hints = { auto = true } } },
|
||
|
},
|
||
|
}
|
||
|
|