Skip to content

feat: add stylua formatter for Lua and Luau files - #18997

Closed
thiagohcaserta wants to merge 1 commit into
anomalyco:devfrom
thiagohcaserta:feat/add-stylua-formatter
Closed

thiagohcaserta wants to merge 1 commit into
anomalyco:devfrom
thiagohcaserta:feat/add-stylua-formatter

Conversation

@thiagohcaserta

@thiagohcaserta thiagohcaserta commented Mar 24, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #18996

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds stylua as a built-in formatter for Lua (.lua) and Luau (.luau) files. It follows the same pattern as the other simple formatters like gleam, nixfmt, and shfmt — checks if stylua is in PATH via which() and runs stylua $FILE to format in place.

How did you verify your code works?

Checked that the exported object matches the Info interface and follows the same structure as the 27 existing formatters. Confirmed stylua $FILE is the correct CLI usage (formats in place by default).

Screenshots / recordings

N/A — no UI changes.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

I found related PRs that address similar functionality:

  1. PR feat(opencode): add stylua formatter support for Lua files #14855: feat(opencode): add stylua formatter support for Lua files

    • Appears to be a previous attempt to add stylua formatter support for Lua files
  2. PR feat(formatters): add stylua, nimpretty, and elm-format formatters #17618: feat(formatters): add stylua, nimpretty, and elm-format formatters

    • Includes stylua formatter as part of a batch of formatters (also includes nimpretty and elm-format)

Both of these PRs are potentially duplicates of PR #18997 as they address adding stylua formatter support. You may want to check their current status (merged/closed/open) and determine if PR #18997 is a fresh approach or if it consolidates learnings from previous attempts.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 24, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@thiagohcaserta

Copy link
Copy Markdown
Author

Closing as duplicate — #14855 and #17618 already address this. Apologies for the noise.

@thiagohcaserta
thiagohcaserta deleted the feat/add-stylua-formatter branch March 24, 2026 20:10
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.

feat: add stylua formatter support for Lua/Luau

1 participant