Rust tools with kickstart.nvim
I had a problem recently with kickstart.nvim where I wasn't able to get inlay hints working from rust-tools.nvim.
This was caused by rust-analyzer being set as the handler, and not rust-tools.
To fix this, simply modify the line containing require("mason-lspconfig").setup_handlers
in your init.lua
with the following:
require("mason").setup()
require("mason-lspconfig").setup()
require("mason-lspconfig").setup_handlers {
function (server_name) -- default handler (optional)
require("lspconfig")[server_name].setup {}
end,
["rust_analyzer"] = function ()
require("rust-tools").setup {}
end
}
Credit goes to this PR comment.