summaryrefslogtreecommitdiff
path: root/.config/nvim/lua/plugins/rust_analyzer.lua
blob: 87dc0106ba04773057579b9aed7d3cffd23515b8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
-- https://github.com/mrcjkb/rustaceanvim

return {
  {
    'mrcjkb/rustaceanvim',
    version = '^6', -- Recommended
    lazy = false, -- This plugin is already lazy
    config = function ()
      vim.g.rustaceanvim = {
        -- Plugin configuration
        tools = {
        },
        -- LSP configuration
        server = {
          default_settings = {
            -- rust-analyzer language server configuration
            ['rust-analyzer'] = {
              checkOnSave = true,
              check = {
                enable = true,
                command = "clippy",
                features = "all",
              },
              completion = {
                autoimport = {
                  enable = false;
                }
              }
            },
          },
        },
        -- DAP configuration
        dap = {
        },
      }
    end
  },
}