Skip to content

feat(formatters): add stylua, nimpretty, and elm-format formatters#17618

Open
sahitya-chandra wants to merge 1 commit intoanomalyco:devfrom
sahitya-chandra:add-stylua-nimpretty-elm-format-formatters
Open

feat(formatters): add stylua, nimpretty, and elm-format formatters#17618
sahitya-chandra wants to merge 1 commit intoanomalyco:devfrom
sahitya-chandra:add-stylua-nimpretty-elm-format-formatters

Conversation

@sahitya-chandra
Copy link

@sahitya-chandra sahitya-chandra commented Mar 15, 2026

Issue for this PR

Closes #XXXX

Type of change

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

What does this PR do?

Adds built-in formatter support for Lua, Nim, and Elm

Changes

  • packages/opencode/src/format/formatter.ts

    • stylua – Lua (.lua), enabled when stylua is on PATH
    • nimpretty – Nim (.nim), enabled when nimpretty is on PATH, command: nimpretty -w $FILE
    • elm-format – Elm (.elm), enabled when elm-format is on PATH, command: elm-format --yes $FILE
  • packages/web/src/content/docs/formatters.mdx

    • Documented the three new formatters in the built-in formatters table (extensions and requirements).

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

The code was verified with typecheck + lint only. No automated or manual runtime verification was done, but I made sure that it follows the same code pattern as other existing formatters

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

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

If you do not follow this template your PR will be automatically rejected.

@github-actions github-actions bot added needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 15, 2026
@github-actions
Copy link
Contributor

Hey! Your PR title Add stylua, nimpretty, and elm-format formatters doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

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

Potential Duplicate Found

PR #14855 - "feat(opencode): add stylua formatter support for Lua files"
#14855

Why it's related: This PR specifically adds stylua formatter support for Lua files, which is one of the three formatters being added in the current PR #17618. This appears to be a partial implementation that may overlap with the new PR's scope.

@sahitya-chandra sahitya-chandra changed the title Add stylua, nimpretty, and elm-format formatters feat(formatters): add stylua, nimpretty, and elm-format formatters Mar 15, 2026
@github-actions github-actions bot removed needs:compliance This means the issue will auto-close after 2 hours. needs:title labels Mar 15, 2026
@github-actions
Copy link
Contributor

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

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.

1 participant