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 <peter@zed.dev>
This commit is contained in:
Andy Waite 2025-03-23 14:54:55 -04:00 committed by GitHub
parent 8294b9f674
commit f19e1e3b5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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: 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 ```json