mirror of
https://github.com/kristoferssolo/SoloVim.git
synced 2025-10-21 20:10:41 +00:00
47 lines
1.1 KiB
Lua
47 lines
1.1 KiB
Lua
return {
|
|
"mrcjkb/rustaceanvim",
|
|
version = "^5",
|
|
lazy = false,
|
|
opts = {
|
|
tools = {
|
|
hover_actions = {
|
|
replace_builtin_hover = false,
|
|
},
|
|
},
|
|
server = {
|
|
on_attach = function(_, bufnr)
|
|
vim.lsp.inlay_hint.enable(true, { bufnr = bufnr })
|
|
end,
|
|
settings = {
|
|
["rust-analyzer"] = {
|
|
--- https://github.com/rust-lang/rust-analyzer/blob/master/docs/user/generated_config.adoc
|
|
cargo = {
|
|
features = "all",
|
|
extraEnv = { RUSTC_WRAPPER = "sccache" },
|
|
},
|
|
completion = {
|
|
fullFunctionSignatures = { enable = true },
|
|
termSearch = { enable = true },
|
|
privateEditable = { enable = true },
|
|
},
|
|
diagnostics = {
|
|
styleLints = { enable = true },
|
|
},
|
|
inlayHints = {
|
|
bindingModeHints = { enable = true },
|
|
closureCaptureHints = { enable = true },
|
|
closureReturnTypeHints = { enable = "always" },
|
|
discriminantHints = { enable = "always" },
|
|
rangeExclusiveHints = { enable = true },
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
dap = {},
|
|
},
|
|
config = function(_, opts)
|
|
vim.g.rustaceanvim = opts
|
|
end,
|
|
}
|