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

Migrate indexing configuration to editor settings #2300

Merged
merged 1 commit into from
Jul 16, 2024

Conversation

vinistock
Copy link
Member

Motivation

Closes #2156

Deprecate our .index.yml file and move to relying on editor settings instead. Editor settings are better suited for configuring language servers, rather than using custom configuration files.

Editor settings already handle different levels of hierarchy. For example, workspace settings and user settings - merging when appropriate. In addition to that, we can show descriptions and examples of settings, which provide a much more intuitive experience. Overall, a custom configuration file is just a worse experience for the users.

A small caveat is that, because editor settings are usually camel case and we use snake case in Ruby, we need to accept both. This is what the settings look like now:

{
  "excludedPatterns": ["**/test/**.rb"],
  "includedPatterns": ["**/bin/**"],
  "excludedGems": ["rubocop", "rubocop-performance"],
  "includedPatterns": ["rake"],
  "excludedMagicComments": ["compiled:true"]
}

Implementation

  1. Started showing a warning for projects that are using the deprecated .index.yml
  2. Started accepting the indexing configuration from initializationOptions
  3. Added the new settings to the VS Code extension

Automated Tests

Changed some tests.

@vinistock vinistock added enhancement New feature or request server This pull request should be included in the server gem's release notes labels Jul 12, 2024
@vinistock vinistock self-assigned this Jul 12, 2024
@vinistock vinistock requested a review from a team as a code owner July 12, 2024 21:02
@vinistock vinistock requested review from andyw8 and st0012 July 12, 2024 21:02
.index.yml Show resolved Hide resolved
@vinistock vinistock merged commit b6e86b2 into main Jul 16, 2024
37 checks passed
@vinistock vinistock deleted the vs/migrate_to_editor_settings branch July 16, 2024 21:05
@andyw8
Copy link
Contributor

andyw8 commented Jul 17, 2024

Should the docs about .index.yml in the README have been updated yet? (I can open a PR if so).

@vinistock
Copy link
Member Author

@andyw8 you're right, I totally forgot about the docs. If you can, please open a PR updating it!

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.

Migrate to configuration file to .ruby-lsp.json
3 participants