diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2025-04-18 17:44:38 +0200 |
|---|---|---|
| committer | Justin M. Keyes <justinkz@gmail.com> | 2025-04-18 17:44:38 +0200 |
| commit | f8b5cbe6312b568def1f91d747e2cdb8984fdf2e (patch) | |
| tree | c1baf319b22d8ccc7d3468276b5ba9a26dfa2775 /lsp/rust_analyzer.lua | |
| parent | feat: angularls #3746 (diff) | |
| download | nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.tar nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.tar.gz nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.tar.bz2 nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.tar.lz nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.tar.xz nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.tar.zst nvim-lspconfig-f8b5cbe6312b568def1f91d747e2cdb8984fdf2e.zip | |
docs: cleanup
- brief should live at the top of each file
- fix indentation for some docs
Diffstat (limited to 'lsp/rust_analyzer.lua')
| -rw-r--r-- | lsp/rust_analyzer.lua | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/lsp/rust_analyzer.lua b/lsp/rust_analyzer.lua index 7bcd5a4d..754eed09 100644 --- a/lsp/rust_analyzer.lua +++ b/lsp/rust_analyzer.lua @@ -1,3 +1,26 @@ +---@brief +--- +--- https://github.com/rust-lang/rust-analyzer +--- +--- rust-analyzer (aka rls 2.0), a language server for Rust +--- +--- +--- See [docs](https://rust-analyzer.github.io/book/configuration.html) for extra settings. The settings can be used like this: +--- ```lua +--- vim.lsp.config('rust_analyzer', { +--- settings = { +--- ['rust-analyzer'] = { +--- diagnostics = { +--- enable = false; +--- } +--- } +--- } +--- }) +--- ``` +--- +--- Note: do not set `init_options` for this LS config, it will be automatically populated by the contents of settings["rust-analyzer"] per +--- https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26. + local util = require 'lspconfig.util' local function reload_workspace(bufnr) @@ -31,28 +54,6 @@ local function is_library(fname) end end ----@brief ---- --- https://github.com/rust-lang/rust-analyzer --- --- rust-analyzer (aka rls 2.0), a language server for Rust --- --- --- See [docs](https://rust-analyzer.github.io/book/configuration.html) for extra settings. The settings can be used like this: --- ```lua --- vim.lsp.config('rust_analyzer', { --- settings = { --- ['rust-analyzer'] = { --- diagnostics = { --- enable = false; --- } --- } --- } --- }) --- ``` --- --- Note: do not set `init_options` for this LS config, it will be automatically populated by the contents of settings["rust-analyzer"] per --- https://github.com/rust-lang/rust-analyzer/blob/eb5da56d839ae0a9e9f50774fa3eb78eb0964550/docs/dev/lsp-extensions.md?plain=1#L26. return { cmd = { 'rust-analyzer' }, filetypes = { 'rust' }, |
