vim.g.rustaceanvim={on_attach=function(T,k)vim.keymap.set("\110","\060\108\101\097\100\101\114\062\099\082",function()vim.cmd.RustLsp("\099\111\100\101\065\099\116\105\111\110")end)vim.keymap.set("\110","\060\108\101\097\100\101\114\062\100\114",function()vim.cmd.RustLsp("\100\101\098\117\103\103\097\098\108\101\115")end,{buffer=k})end;tools={float_win_config={border="\114\111\117\110\100\101\100"}};settings={["\114\117\115\116-\097\110\097\108\121\122\101\114"]={cargo={allFeatures=true,loadOutDirsFromCheck=true;runBuildScripts=true},checkOnSave={allFeatures=true;command="\099\108\105\112\112\121",extraArgs={"--\110\111-\100\101\112\115"}},procMacro={enable=true;ignored={["\097\115\121\110\099-\116\114\097\105\116"]={"\097\115\121\110\099\095\116\114\097\105\116"},["\110\097\112\105-\100\101\114\105\118\101"]={"\110\097\112\105"},["\097\115\121\110\099-\114\101\099\117\114\115\105\111\110"]={"\097\115\121\110\099\095\114\101\099\117\114\115\105\111\110"}}}}}}
vim.g.rustaceanvim = {
  on_attach = function(client, bufnr)
    vim.keymap.set("n", "<leader>cR", function()
      vim.cmd.RustLsp("codeAction")
    end)
    vim.keymap.set("n", "<leader>dr", function()
      vim.cmd.RustLsp("debuggables")
    end, { buffer = bufnr })
  end,
  tools = {
    float_win_config = {
      border = "rounded",
    },
  },
  settings = {
    -- rust-analyzer language server configuration
    ["rust-analyzer"] = {
      cargo = {
        allFeatures = true,
        loadOutDirsFromCheck = true,
        runBuildScripts = true,
      },
      -- Add clippy lints for Rust.
      checkOnSave = {
        allFeatures = true,
        command = "clippy",
        extraArgs = { "--no-deps" },
      },
      procMacro = {
        enable = true,
        ignored = {
          ["async-trait"] = { "async_trait" },
          ["napi-derive"] = { "napi" },
          ["async-recursion"] = { "async_recursion" },
        },
      },
    },
  },
}
