diff --git a/docgen/templates/documentation.md.in b/docgen/templates/documentation.md.in index e0e5cb70..3e18bcad 100644 --- a/docgen/templates/documentation.md.in +++ b/docgen/templates/documentation.md.in @@ -2,6 +2,7 @@ Documentation for `crates.nvim` `` # Features - Complete crate versions and features +- In-process language server - Completion sources for: - [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - [coq.nvim](https://github.com/ms-jpq/coq_nvim) @@ -27,6 +28,24 @@ Documentation for `crates.nvim` `` - Indicate if a dependency is optional # Setup + +## lsp +Enable the in-process language server in the setup and select whether to enable +code actions and auto completion. +```lua +require("crates").setup { + ... + lsp = { + enabled = true, + on_attach = function(client, bufnr) + -- the same on_attach function as for your other lsp's + end, + actions = true, + completion = true, + }, +} +``` + ## Auto completion ### [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) source diff --git a/docgen/wiki/Unstable-documentation.md b/docgen/wiki/Unstable-documentation.md index f04b4f62..7a25685a 100644 --- a/docgen/wiki/Unstable-documentation.md +++ b/docgen/wiki/Unstable-documentation.md @@ -2,6 +2,7 @@ Documentation for `crates.nvim` `unstable` # Features - Complete crate versions and features +- In-process language server - Completion sources for: - [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - [coq.nvim](https://github.com/ms-jpq/coq_nvim) @@ -27,6 +28,24 @@ Documentation for `crates.nvim` `unstable` - Indicate if a dependency is optional # Setup + +## lsp +Enable the in-process language server in the setup and select whether to enable +code actions and auto completion. +```lua +require("crates").setup { + ... + lsp = { + enabled = true, + on_attach = function(client, bufnr) + -- the same on_attach function as for your other lsp's + end, + actions = true, + completion = true, + }, +} +``` + ## Auto completion ### [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) source