Skip to content

Commit 95cfc4c

Browse files
committed
feat(rust): use crates in process LSP
1 parent ec4d829 commit 95cfc4c

File tree

1 file changed

+7
-25
lines changed

1 file changed

+7
-25
lines changed

lua/astrocommunity/pack/rust/init.lua

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -48,35 +48,17 @@ local pack = {
4848
},
4949
{
5050
"Saecki/crates.nvim",
51-
lazy = true,
52-
dependencies = {
53-
"AstroNvim/astrocore",
54-
opts = {
55-
autocmds = {
56-
CmpSourceCargo = {
57-
{
58-
event = "BufRead",
59-
desc = "Load crates.nvim into Cargo buffers",
60-
pattern = "Cargo.toml",
61-
callback = function()
62-
require("cmp").setup.buffer { sources = { { name = "crates" } } }
63-
require "crates"
64-
end,
65-
},
66-
},
67-
},
68-
},
69-
},
51+
event = { "BufRead Cargo.toml" },
7052
opts = {
7153
completion = {
72-
cmp = { enabled = true },
73-
crates = {
74-
enabled = true,
75-
},
54+
crates = { enabled = true },
7655
},
77-
null_ls = {
56+
lsp = {
7857
enabled = true,
79-
name = "crates.nvim",
58+
on_attach = function(...) require("astrolsp").on_attach(...) end,
59+
actions = true,
60+
completion = true,
61+
hover = true,
8062
},
8163
},
8264
},

0 commit comments

Comments
 (0)