Skip to content

Commit

Permalink
Add "ruby-lsp" section to documentation (#2352)
Browse files Browse the repository at this point in the history
Co-authored-by: Erik-B. Ernst <[email protected]>
Co-authored-by: Rafal Chlodnicki <[email protected]>
  • Loading branch information
3 people authored Nov 3, 2023
1 parent da9abf3 commit 2baf729
Showing 1 changed file with 36 additions and 4 deletions.
40 changes: 36 additions & 4 deletions docs/src/language_servers.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,14 +489,18 @@ There are multiple options:

### Sorbet

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

gem install sorbet
gem install sorbet-runtime
```sh
gem install sorbet
gem install sorbet-runtime
```

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

bundle install
```sh
bundle install
```

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

Expand All @@ -512,6 +516,34 @@ There are multiple options:
}
```

### Ruby LSP

1. Install the `ruby-lsp` gem (see [github:Shopify/ruby-lsp](https://github.com/Shopify/ruby-lsp)):

```sh
gem install ruby-lsp
```

2. Open `Preferences > Package Settings > LSP > Settings` and add the `"ruby-lsp"` client configuration to the `"clients"`:

```jsonc
{
"clients": {
"ruby-lsp": {
"enabled": true,
"command": ["ruby-lsp"],
"selector": "source.ruby | text.html.ruby",
"initializationOptions": {
"enabledFeatures": {
"diagnostics": true
},
"experimentalFeaturesEnabled": true
}
}
}
}
```

## Rust

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

0 comments on commit 2baf729

Please sign in to comment.