Skip to content

Commit

Permalink
feat: add setting to customize requests features
Browse files Browse the repository at this point in the history
  • Loading branch information
snutij committed Dec 5, 2023
1 parent b3c9243 commit 43e6dbd
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ test boilerplates. Find the full list [here](https://github.com/Shopify/vscode-r

#### Enable or disable features

The Ruby LSP has all its features enabled by default, but disabling specific features is supported. To do so, open the
The Ruby LSP allows disabling specific features. To do so, open the
language status center right next to the language mode Ruby and select `Manage` right next to enabled features.

![Ruby LSP status center](extras/ruby_lsp_status_center.png)

It's also possible to configure with more granularity code lens and inlay hint features, see the [ruby-lsp server
documentation](https://shopify.github.io/ruby-lsp/RubyLsp/Requests.html).

#### Ruby version managers

To boot the server properly, the Ruby LSP uses a version manager to activate the right environment variables that point
Expand Down
33 changes: 33 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,39 @@
"references": true
}
},
"rubyLsp.featuresConfiguration": {
"description": "Turn on/off specific features from request",
"type": "object",
"properties": {
"codeLens": {
"description": "Customize code lens features",
"type": "object",
"properties": {
"enableAll": {
"type": "boolean"
},
"gemfileLinks": {
"type": "boolean"
}
}
},
"inlayHint": {
"description": "Customize inlay hint features",
"type": "object",
"properties": {
"enableAll": {
"type": "boolean"
},
"implicitRescue": {
"type": "boolean"
},
"implicitHashValue": {
"type": "boolean"
}
}
}
}
},
"rubyLsp.rubyVersionManager": {
"description": "The Ruby version manager to use",
"type": "string",
Expand Down
1 change: 1 addition & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ function collectClientOptions(
experimentalFeaturesEnabled: configuration.get(
"enableExperimentalFeatures",
),
featuresConfiguration: configuration.get("featuresConfiguration"),
formatter: configuration.get("formatter"),
},
};
Expand Down

0 comments on commit 43e6dbd

Please sign in to comment.