VoidVim/lua/config/plugins/rustaceanvim.lua

38 lines
859 B
Lua
Raw Normal View History

2024-12-13 14:31:21 +03:00
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: " -- "=> "
}
},
2024-12-13 14:31:21 +03:00
server = {
on_attach = function(client, bufnr)
navic.attach(client, bufnr)
2024-12-13 14:31:21 +03:00
end,
settings = {
['rust-analyzer'] = {
assist = {
importEnforceGranularity = true,
importPrefix = "create"
2024-12-13 14:31:21 +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
}