From f8b5cbe6312b568def1f91d747e2cdb8984fdf2e Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Fri, 18 Apr 2025 17:44:38 +0200 Subject: docs: cleanup - brief should live at the top of each file - fix indentation for some docs --- lsp/rust_analyzer.lua | 45 +++++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 22 deletions(-) (limited to 'lsp/rust_analyzer.lua') 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' }, -- cgit v1.2.3-70-g09d2