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 to configuration file to .ruby-lsp.json #2156

Open
andyw8 opened this issue Jun 11, 2024 · 3 comments · Fixed by #2300
Open

Migrate to configuration file to .ruby-lsp.json #2156

andyw8 opened this issue Jun 11, 2024 · 3 comments · Fixed by #2300
Assignees
Labels
enhancement New feature or request

Comments

@andyw8
Copy link
Contributor

andyw8 commented Jun 11, 2024

We had originally considered changing .index.yml to be .ruby-lsp.yml so that additional could be supported.

However from looking at other language server implementations, the preferred approach for this kind of things seems instead be to pass any configuration as part of the initialization options.

@tachyons
Copy link

@andyw8 @vinistock Is it possible to rethink about this approach ? When working with large code bases like GitLab, ruby-lsp takes several Giga bytes of RAM for indexing, So it is important to exclude unnecessary directories to make the ruby-lsp usable. So Gitlab added this file by default .

Passing this directories in the editor is are hard, and difficult to share in the team. Also for a person working on different ruby projects, the directories to include will be different.

@vinistock
Copy link
Member

@tachyons I brought this up with the team. We are okay with keeping the editor agnostic configuration file under certain conditions:

  1. We want to move from YAML to JSON. Easier to handle and then the extension could even contribute completion for the keys and values in VS Code
  2. We want to rename the file to ruby-lsp.json, so that it captures any Ruby LSP configuration and not just indexing
  3. By keeping the configuration file, there will be 3 levels of configuration that will need to be merged. User editor settings (global), workspace editor settings (project-specific) and the ruby-lsp.json configuration file (project-specific). Editors already make workspace take precedence over user settings and merge them, but we will also want the configuration file to take precedence over editor settings
  4. We will not support global configurations through files like these. For example, a ~/.ruby-lsp.json file. Otherwise, it would introduce a 4th level of precedence to account for. Global configuration will remain editor only

I'll re-open this issue and change the title, but our team is currently quite busy looking at other things, so we cannot prioritize the work to make these changes right now. If you're interested in contributing it, we're happy to help and provide guidance on what needs to change.

@vinistock vinistock reopened this Oct 28, 2024
@vinistock vinistock changed the title Deprecate .index.yml, move configuration to initializer Migrate to configuration file to .ruby-lsp.json Oct 28, 2024
@tachyons
Copy link

tachyons commented Nov 7, 2024

@vinistock Thanks for re opening the issue. I don't have bandwidth to contribute at the moment, I'll try in the future if I get time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants