feat(format): add formatters for Lua, Swift, Scala, Typst, and C##29257
Open
amirlankalm wants to merge 2 commits into
Open
feat(format): add formatters for Lua, Swift, Scala, Typst, and C##29257amirlankalm wants to merge 2 commits into
amirlankalm wants to merge 2 commits into
Conversation
Add five formatters for languages that were already recognized in the language extension map but had no formatter support: - stylua (.lua) — formats Lua files, respects .stylua.toml if present - swiftformat (.swift) — standard Swift formatter - scalafmt (.scala) — requires .scalafmt.conf in project tree - typst fmt (.typ, .typc) — built-in Typst formatter - csharpier (.cs) — installed via dotnet-csharpier global tool
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #27728: feat(format): add stylua formatter for Lua files
This may indicate that either:
|
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #
Type of change
What does this PR do?
Adds five formatters for languages already in the extension map but with no formatter support:
stylua(Lua),swiftformat(Swift),scalafmt(Scala),typst fmt(Typst), andcsharpier(C#).Each follows the same binary-detection pattern as existing formatters like
shfmtandgofmt.scalafmtadditionally requires a.scalafmt.confconfig file to activate, matching theocamlformatpattern.Also updates the formatter table in
formatters.mdxwith all five entries.Note: this PR overlaps with #27728 which adds
styluaonly — this one is a superset. Happy to dropstyluahere if the maintainers prefer to merge #27728 separately first.How did you verify your code works?
bun turbo typecheck— all 15 packages passshfmt,gofmt,ocamlformat) so the same code paths are exercisedstylua,swiftformat, andtypstpick up correctly when the binary is in PATHScreenshots / recordings
N/A — formatter-only change, no UI.
Checklist