2024-12-13 14:31:21 +03:00
|
|
|
local navic = require("nvim-navic")
|
|
|
|
|
|
|
|
vim.g.rustaceanvim = {
|
2024-12-23 00:01:10 +03:00
|
|
|
tools = {
|
|
|
|
autoSetHints = true,
|
|
|
|
inlay_hints = {
|
|
|
|
show_parameter_hints = true,
|
|
|
|
parameter_hints_prefix = "in: ", -- "<- "
|
|
|
|
other_hints_prefix = "out: " -- "=> "
|
|
|
|
}
|
|
|
|
},
|
2024-12-13 14:31:21 +03:00
|
|
|
server = {
|
|
|
|
on_attach = function(client, bufnr)
|
2024-12-23 00:01:10 +03:00
|
|
|
navic.attach(client, bufnr)
|
2024-12-13 14:31:21 +03:00
|
|
|
end,
|
|
|
|
settings = {
|
|
|
|
['rust-analyzer'] = {
|
2024-12-23 00:01:10 +03:00
|
|
|
assist = {
|
|
|
|
importEnforceGranularity = true,
|
|
|
|
importPrefix = "create"
|
2024-12-13 14:31:21 +03:00
|
|
|
},
|
2024-12-23 00:01:10 +03:00
|
|
|
cargo = { allFeatures = true },
|
|
|
|
checkOnSave = {
|
|
|
|
-- default: `cargo check`
|
|
|
|
command = "clippy",
|
|
|
|
allFeatures = true
|
|
|
|
},
|
|
|
|
inlayHints = {
|
|
|
|
lifetimeElisionHints = {
|
|
|
|
enable = true,
|
|
|
|
useParameterNames = true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-12-13 14:31:21 +03:00
|
|
|
}
|