Skip to content

Introduce configuration file support#888

Merged
vinistock merged 3 commits into
mainfrom
vs_introduce_config_file
Jun 30, 2026
Merged

Introduce configuration file support#888
vinistock merged 3 commits into
mainfrom
vs_introduce_config_file

Conversation

@vinistock

@vinistock vinistock commented Jun 26, 2026

Copy link
Copy Markdown
Member

While Rubydex is a framework that can be used to build all sorts of tools, in most cases we want consistency in the base analysis.

For example, imagine you have an LSP and a linter based on Rubydex, but because they each configure the framework differently, you get different results in the editor vs in the CLI. That would be a pretty poor experience.

I believe we can provide an easy way to ensure consistency while still maintaining flexibility so that the odd case can load custom configuration files for a random tool.

Implementation

I recommend reviewing per commit:

  1. Allow loading configuration from a file. This adds the infrastructure to read, parse and apply a configuration file, hooking it up to the graph. See the example configuration file below for the format
  2. Exposes load_config in the Ruby API
  3. Adds rubydex.toml default configuration for this repo itself
# rubydex.toml
# Comments
single_value = true

multi_value = ["one", "two"]

[something.nested]
enabled = false

@vinistock vinistock self-assigned this Jun 26, 2026
@vinistock vinistock requested a review from a team as a code owner June 26, 2026 18:08
@vinistock vinistock added the enhancement New feature or request label Jun 26, 2026
@vinistock vinistock force-pushed the vs_introduce_config_file branch from 6dbe73e to b77dd62 Compare June 26, 2026 18:09
Base automatically changed from vs_store_workspace_path_in_config to main June 26, 2026 20:40
@vinistock vinistock force-pushed the vs_introduce_config_file branch from b77dd62 to d60d74e Compare June 26, 2026 21:03
@st0012

st0012 commented Jun 26, 2026

Copy link
Copy Markdown
Member

The implementation looks good but I'm not sure about the format we use for .rubydex.
I personally have NEVER used the INI format in any tools before, nor have seen it being used in the Ruby ecosystem. So I think using it would add additional friction to properly configure Rubydex for users.
I think yml is still the best choice for user adoption. toml will be fine for me too.

vinistock and others added 3 commits June 30, 2026 13:48
Co-authored-by: Alex Rocha <alexcrocha@users.noreply.github.com>
Co-authored-by: Alex Rocha <alexcrocha@users.noreply.github.com>
Co-authored-by: Alex Rocha <alexcrocha@users.noreply.github.com>
@vinistock vinistock force-pushed the vs_introduce_config_file branch from d60d74e to 6d7fc24 Compare June 30, 2026 17:48
@vinistock

Copy link
Copy Markdown
Member Author

Switched to TOML according to our discussions.

@st0012 st0012 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the PR description, we still mention .rubydex and INI format. Let's update it
Also, should we use .rubydex.toml? Is it intentional to drop . prefix with switching to toml?

@vinistock

Copy link
Copy Markdown
Member Author

I removed the leading dot intentionally since we now have a file extension. Just rubydex (instead of .rubydex) felt odd, but rubydex.toml seems fine to me.

@vinistock vinistock merged commit 6ec70a1 into main Jun 30, 2026
36 checks passed
@vinistock vinistock deleted the vs_introduce_config_file branch June 30, 2026 20:14
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 this pull request may close these issues.

2 participants