Skip to content

Adds luau.resolveConfig to @std#908

Open
tyulpan wants to merge 1 commit intoluau-lang:primaryfrom
tyulpan:add-resolveconfig-to-std
Open

Adds luau.resolveConfig to @std#908
tyulpan wants to merge 1 commit intoluau-lang:primaryfrom
tyulpan:add-resolveconfig-to-std

Conversation

@tyulpan
Copy link
Copy Markdown
Contributor

@tyulpan tyulpan commented Mar 27, 2026

Adds luau.resolveConfig(filepath: path.Pathlike): LuauConfig to @std, which resolves the Luau configuration for a given file path by walking up the directory tree and merging .luaurc / .config.luau files.

Resolves #322.
Followed the official RFCs for .luaurc and the RFCs for .config.luau.

The dogfooding test suite passed, but it was excluded from the test file to avoid creating an unnecessary dependency:

suite:case("resolveConfigDogfooding", function(assert)
  local config = luau.resolveConfig(debug.info(1, "s"))
  assert.eq(config.languageMode, "strict")
  assert.neq(config.aliases, nil)
  assert.eq(config.aliases.batteries.value, "./batteries")
  assert.eq(config.aliases.std.value, "./lute/std/libs")
  assert.eq(config.aliases.lute.value, "./definitions")
  assert.eq(config.aliases.commands.value, "./lute/cli/commands")
end)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose Luau config resolver to lute

1 participant