From c2b9070562849a6c39dc1b3fbff6e2be162cfd43 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Tue, 30 Jul 2024 00:54:43 -0700 Subject: [PATCH] Revert "rust: full config" This reverts commit 00629796bb7f52fc6914a35116bf23309e95e622. --- lua/plugins/rustacean.lua | 34 ---------------------------------- 1 file changed, 34 deletions(-) diff --git a/lua/plugins/rustacean.lua b/lua/plugins/rustacean.lua index 1153374..3837fdd 100644 --- a/lua/plugins/rustacean.lua +++ b/lua/plugins/rustacean.lua @@ -1,49 +1,15 @@ return { "mrcjkb/rustaceanvim", - version = "^4", -- Recommended - ft = { "rust" }, opts = { server = { - on_attach = function(_, bufnr) - vim.keymap.set("n", "cR", function() - vim.cmd.RustLsp("codeAction") - end, { desc = "Code Action", buffer = bufnr }) - vim.keymap.set("n", "dr", function() - vim.cmd.RustLsp("debuggables") - end, { desc = "Rust Debuggables", buffer = bufnr }) - end, default_settings = { -- rust-analyzer language server configuration ["rust-analyzer"] = { cargo = { - allFeatures = true, targetDir = true, - loadOutDirsFromCheck = true, - buildScripts = { - enable = true, - }, - }, - -- Add clippy lints for Rust. - checkOnSave = true, - procMacro = { - enable = true, - ignored = { - ["async-trait"] = { "async_trait" }, - ["napi-derive"] = { "napi" }, - ["async-recursion"] = { "async_recursion" }, - }, }, }, }, }, }, - config = function(_, opts) - vim.g.rustaceanvim = vim.tbl_deep_extend("keep", vim.g.rustaceanvim or {}, opts or {}) - if vim.fn.executable("rust-analyzer") == 0 then - LazyVim.error( - "**rust-analyzer** not found in PATH, please install it.\nhttps://rust-analyzer.github.io/", - { title = "rustaceanvim" } - ) - end - end, }