45 lines
993 B
Lua
45 lines
993 B
Lua
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",
|
|
"<leader>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,
|
|
}
|