From 550ceec549519e564e52c3d4f02f88ebad531236 Mon Sep 17 00:00:00 2001 From: Thorsten Ball Date: Wed, 18 Sep 2024 10:04:13 +0200 Subject: [PATCH] docs: Update Ruby docs to provide more complete examples (#17987) Closes #17917 Release Notes: - N/A --- docs/src/languages/ruby.md | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/docs/src/languages/ruby.md b/docs/src/languages/ruby.md index 6385de9c963050d5f963055a6b4f51ccf7b2323e..47466a35cdb304a4ef46a5c7b9b93605a743c26d 100644 --- a/docs/src/languages/ruby.md +++ b/docs/src/languages/ruby.md @@ -138,15 +138,21 @@ Ruby LSP uses pull-based diagnostics which Zed doesn't support yet. We can tell ```json { + "languages": { + "Ruby": { + "language_servers": ["ruby-lsp", "!solargraph", "..."], + }, + }, "lsp": { "ruby-lsp": { "initialization_options": { "enabledFeatures": { - "diagnostics": false - } - } - } - } + // This disables diagnostics + "diagnostics": false, + }, + }, + }, + }, } ``` @@ -164,11 +170,24 @@ Rubocop has unsafe autocorrection disabled by default. We can tell Zed to enable ```json { + "languages": { + "Ruby": { + // Use ruby-lsp as the primary language server and rubocop as the secondary. + "language_servers": ["ruby-lsp", "rubocop", "!solargraph", "..."] + } + }, "lsp": { "rubocop": { "initialization_options": { "safeAutocorrect": false } + }, + "ruby-lsp": { + "initialization_options": { + "enabledFeatures": { + "diagnostics": false + } + } } } }