diff --git a/lua/config/plugins/rustaceanvim.lua b/lua/config/plugins/rustaceanvim.lua index 369f407..39a07a4 100644 --- a/lua/config/plugins/rustaceanvim.lua +++ b/lua/config/plugins/rustaceanvim.lua @@ -1,18 +1,37 @@ 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) + navic.attach(client, bufnr) end, - filetypes = {"rust"}, settings = { - -- rust-analyzer language server configuration ['rust-analyzer'] = { - cargo = { - allFeatures = true, + assist = { + importEnforceGranularity = true, + importPrefix = "create" }, - }, - }, - }, + cargo = { allFeatures = true }, + checkOnSave = { + -- default: `cargo check` + command = "clippy", + allFeatures = true + }, + inlayHints = { + lifetimeElisionHints = { + enable = true, + useParameterNames = true + } + } + } + } + } }