Skip to content

Introduce configuration file support#888

Open
vinistock wants to merge 3 commits into
mainfrom
vs_introduce_config_file
Open

Introduce configuration file support#888
vinistock wants to merge 3 commits into
mainfrom
vs_introduce_config_file

Conversation

@vinistock

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 default configuration for this repo itself
# .rubydex
# Comments
single_value = true

multi_value_one_line = one, two
multi_value_multi_line = one, two,
  three,
  four

trailing_comma = hello,

I went with a simple text/ini format to avoid extra dependencies. It's super simple to parse and entirely based on new lines and commas.

@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 and others added 3 commits June 26, 2026 17:03
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 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.

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