forked from dreamsofcode-io/neovim-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugins.lua
77 lines (76 loc) · 1.62 KB
/
plugins.lua
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
local cmp = require "cmp"
local plugins = {
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"rust-analyzer",
},
},
},
{
"neovim/nvim-lspconfig",
config = function()
require "plugins.configs.lspconfig"
require "custom.configs.lspconfig"
end,
},
{
"simrat39/rust-tools.nvim",
ft = "rust",
dependencies = "neovim/nvim-lspconfig",
opts = function ()
return require "custom.configs.rust-tools"
end,
config = function(_, opts)
require('rust-tools').setup(opts)
end
},
{
"mfussenegger/nvim-dap",
init = function()
require("core.utils").load_mappings("dap")
end
},
{
'saecki/crates.nvim',
ft = {"toml"},
config = function(_, opts)
local crates = require('crates')
crates.setup(opts)
require('cmp').setup.buffer({
sources = { { name = "crates" }}
})
crates.show()
require("core.utils").load_mappings("crates")
end,
},
{
"rust-lang/rust.vim",
ft = "rust",
init = function ()
vim.g.rustfmt_autosave = 1
end
},
{
"theHamsta/nvim-dap-virtual-text",
lazy = false,
config = function(_, opts)
require("nvim-dap-virtual-text").setup()
end
},
{
"hrsh7th/nvim-cmp",
opts = function()
local M = require "plugins.configs.cmp"
M.completion.completeopt = "menu,menuone,noselect"
M.mapping["<CR>"] = cmp.mapping.confirm {
behavior = cmp.ConfirmBehavior.Insert,
select = false,
}
table.insert(M.sources, {name = "crates"})
return M
end,
}
}
return plugins