From f19e1e3b5f23ec7f64b692f4530825e0e50e5b95 Mon Sep 17 00:00:00 2001 From: Andy Waite Date: Sun, 23 Mar 2025 14:54:55 -0400 Subject: [PATCH] docs: Document how to use project-specific settings for Ruby LSP (#27310) I think it's helpful to illustrate how some settings can be added to the project settings file rather than being global. Release Notes: - N/A --------- Co-authored-by: Peter Tripp --- docs/src/languages/ruby.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/src/languages/ruby.md b/docs/src/languages/ruby.md index cf14a8a654..44be3a8681 100644 --- a/docs/src/languages/ruby.md +++ b/docs/src/languages/ruby.md @@ -158,6 +158,21 @@ Ruby LSP uses pull-based diagnostics which Zed doesn't support yet. We can tell } ``` +LSP `settings` and `initialization_options` can also be project-specific. For example to use [standardrb/standard](https://github.com/standardrb/standard) as a formatter and linter for a particular project, add this to a `.zed/settings.json` inside your project repo: + +```json +{ + "lsp": { + "ruby-lsp": { + "initialization_options": { + "formatter": "standard", + "linters": ["standard"] + } + } + } +} +``` + By default, Ruby LSP does not use `bundle exec` to run in the context of the bundle. To enable that, you can use the `use_bundler` configuration option: ```json