Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forward initialization settings to addons #2513

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes #1204
First step to allow Shopify/ruby-lsp-rails#389

While we work super hard to minimize the amount of configuration for the Ruby LSP, it's not realistic to assume that addons are not going to need any settings to be exposed.

We need a way to allow addons to receive relevant editor settings, so that their behaviour can be customized.

Implementation

The idea is to allow for configuration objects like

"rubyLsp.addonSettings": {
  "Ruby LSP Rails": {
    "runtimeServerCommand": "bin/dev server",
    "somethingElse": false,
  }
}

And then we remember those settings in the global state. Addons will then have access to these settings and can decide what to do accordingly.

Automated Tests

Added tests.

@vinistock vinistock added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Aug 29, 2024
@vinistock vinistock self-assigned this Aug 29, 2024
@vinistock vinistock requested a review from a team as a code owner August 29, 2024 18:26
@vinistock vinistock requested review from andyw8 and st0012 August 29, 2024 18:26
@vinistock vinistock force-pushed the vs-forward-settings-to-addons branch from 697c5e8 to 4d214e3 Compare August 29, 2024 18:46
@vinistock vinistock merged commit 7d0344a into main Aug 29, 2024
34 checks passed
@vinistock vinistock deleted the vs-forward-settings-to-addons branch August 29, 2024 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Forward initialization options to addons
3 participants