return { "mrcjkb/rustaceanvim", version = "^5", -- Recommended lazy = false, -- This plugin is already lazy config = function() vim.g.rustaceanvim = { -- Plugin configuration tools = {}, -- LSP configuration server = { capabilities = { textDocument = { completion = { completionItem = { snippetSupport = false, }, }, }, }, on_attach = function(client, bufnr) -- you can also put keymaps in here vim.keymap.set("n", "ca", function() vim.cmd.RustLsp("codeAction") -- supports rust-analyzer's grouping -- or vim.lsp.buf.codeAction() if you don't want grouping. end, { silent = true, buffer = bufnr }) vim.keymap.set( "n", "t", -- Override Neovim's built-in hover keymap with rustaceanvim's hover actions function() vim.cmd.RustLsp({ "renderDiagnostic", "current" }) -- defaults to 'cycle' end, { silent = true, buffer = bufnr } ) end, default_settings = { -- rust-analyzer language server configuration ["rust-analyzer"] = { check = { command = "clippy", }, }, }, }, -- DAP configuration dap = {}, } end, }