Skip to content

Commit a63681f

Browse files
committed
docs: document that the LspAttach autocmd can be used
1 parent fd2bbca commit a63681f

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

doc/crates.txt

+2
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,8 @@ on_attach *crates-config-on_attach*
662662

663663
NOTE: Ignored if |crates-config-autoload| is disabled.
664664

665+
NOTE: If you're using the |LspAttach| autocmd, this isn't necessary.
666+
665667

666668
text *crates-config-text*
667669
Section type: `TextConfig`

docgen/templates/documentation.md.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ require("crates").setup {
4141
lsp = {
4242
enabled = true,
4343
on_attach = function(client, bufnr)
44-
-- the same on_attach function as for your other lsp's
44+
-- the same on_attach function as for your other language servers
45+
-- can be ommited if you're using the `LspAttach` autocmd
4546
end,
4647
actions = true,
4748
completion = true,

docgen/wiki/Documentation-unstable.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ require("crates").setup {
4141
lsp = {
4242
enabled = true,
4343
on_attach = function(client, bufnr)
44-
-- the same on_attach function as for your other lsp's
44+
-- the same on_attach function as for your other language servers
45+
-- can be ommited if you're using the `LspAttach` autocmd
4546
end,
4647
actions = true,
4748
completion = true,

lua/crates/config/init.lua

+2
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,8 @@ entry(M.schema, {
239239
Callback to run when a `Cargo.toml` file is opened.
240240
241241
NOTE: Ignored if |crates-config-autoload| is disabled.
242+
243+
NOTE: If you're using the |LspAttach| autocmd, this isn't necessary.
242244
]],
243245
})
244246

0 commit comments

Comments
 (0)