Skip to content

Commit 20a1dce

Browse files
committed
docs: improve installation recommendations
1 parent ca9b75b commit 20a1dce

File tree

1 file changed

+8
-12
lines changed

1 file changed

+8
-12
lines changed

README.md

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ local opts = {
206206

207207
```lua
208208
{
209-
"AstroNvim/astrolsp",
210-
dependencies = { "neovim/nvim-lspconfig" },
209+
"neovim/nvim-lspconfig",
210+
dependencies = { "AstroNvim/astrolsp", opts = {} },
211211
opts = {}
212212
}
213213
```
@@ -216,14 +216,10 @@ local opts = {
216216

217217
```lua
218218
{
219-
"AstroNvim/astrolsp",
219+
"williamboman/mason-lspconfig.nvim",
220220
dependencies = {
221-
"neovim/nvim-lspconfig",
222-
{
223-
"williamboman/mason-lspconfig.nvim",
224-
dependencies = { "williamboman/mason.nvim" },
225-
opts = {}
226-
}
221+
"williamboman/mason.nvim",
222+
{ "neovim/nvim-lspconfig", dependencies = { "AstroNvim/astrolsp", opts = {} } },
227223
},
228224
opts = {}
229225
}
@@ -237,9 +233,9 @@ local opts = {
237233
dependencies = {
238234
{ "AstroNvim/astrolsp", opts = {} },
239235
},
240-
opts = {
241-
on_attach = function(client, bufnr) require("astrolsp").on_attach(client, bufnr) end
242-
},
236+
opts = function(_, opts)
237+
opts.on_attach = require("astrolsp").on_attach
238+
end
243239
}
244240
```
245241

0 commit comments

Comments
 (0)