Skip to content

Commit 2baf729

Browse files
themilkmanErik-B. Ernstrchl
authored
Add "ruby-lsp" section to documentation (#2352)
Co-authored-by: Erik-B. Ernst <[email protected]> Co-authored-by: Rafal Chlodnicki <[email protected]>
1 parent da9abf3 commit 2baf729

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

docs/src/language_servers.md

+36-4
Original file line numberDiff line numberDiff line change
@@ -489,14 +489,18 @@ There are multiple options:
489489

490490
### Sorbet
491491

492-
1. Install the sorbet and sorbet-runtime gem (see [github:sorbet/sorbet](https://github.com/sorbet/sorbet)):
492+
1. Install the `sorbet` and `sorbet-runtime` gem (see [github:sorbet/sorbet](https://github.com/sorbet/sorbet)):
493493

494-
gem install sorbet
495-
gem install sorbet-runtime
494+
```sh
495+
gem install sorbet
496+
gem install sorbet-runtime
497+
```
496498

497499
If you have a Gemfile, using bundler, add sorbet and sorbet-runtime to your Gemfile and run:
498500

499-
bundle install
501+
```sh
502+
bundle install
503+
```
500504

501505
2. Open `Preferences > Package Settings > LSP > Settings` and add the `"sorbet"` client configuration to the `"clients"`:
502506

@@ -512,6 +516,34 @@ There are multiple options:
512516
}
513517
```
514518

519+
### Ruby LSP
520+
521+
1. Install the `ruby-lsp` gem (see [github:Shopify/ruby-lsp](https://github.com/Shopify/ruby-lsp)):
522+
523+
```sh
524+
gem install ruby-lsp
525+
```
526+
527+
2. Open `Preferences > Package Settings > LSP > Settings` and add the `"ruby-lsp"` client configuration to the `"clients"`:
528+
529+
```jsonc
530+
{
531+
"clients": {
532+
"ruby-lsp": {
533+
"enabled": true,
534+
"command": ["ruby-lsp"],
535+
"selector": "source.ruby | text.html.ruby",
536+
"initializationOptions": {
537+
"enabledFeatures": {
538+
"diagnostics": true
539+
},
540+
"experimentalFeaturesEnabled": true
541+
}
542+
}
543+
}
544+
}
545+
```
546+
515547
## Rust
516548

517549
Follow installation instructions on [LSP-rust-analyzer](https://github.com/sublimelsp/LSP-rust-analyzer).

0 commit comments

Comments
 (0)