38 lines
859 B
Lua
38 lines
859 B
Lua
local navic = require("nvim-navic")
|
|
|
|
vim.g.rustaceanvim = {
|
|
tools = {
|
|
autoSetHints = true,
|
|
inlay_hints = {
|
|
show_parameter_hints = true,
|
|
parameter_hints_prefix = "in: ", -- "<- "
|
|
other_hints_prefix = "out: " -- "=> "
|
|
}
|
|
},
|
|
server = {
|
|
on_attach = function(client, bufnr)
|
|
navic.attach(client, bufnr)
|
|
end,
|
|
settings = {
|
|
['rust-analyzer'] = {
|
|
assist = {
|
|
importEnforceGranularity = true,
|
|
importPrefix = "create"
|
|
},
|
|
cargo = { allFeatures = true },
|
|
checkOnSave = {
|
|
-- default: `cargo check`
|
|
command = "clippy",
|
|
allFeatures = true
|
|
},
|
|
inlayHints = {
|
|
lifetimeElisionHints = {
|
|
enable = true,
|
|
useParameterNames = true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|