Minimal implementation of wing fmt
for whitespace cleanup
#6510
Labels
⌨️ cli
CLI
✨ enhancement
New feature or request
needs-discussion
Further discussion is needed prior to impl
Use Case
An opinioned formatting tool helps keep code beautiful and frees PRs from formatting nitpicks.
We have #475 but it focuses on enforcing certain stylistic things present in the spec. It would be useful to focus on a minimal but useful whitespace formatter.
Proposed Solution
wing fmt
defaults to all wing files in the current directory, can otherwise provide a path to do the following:let x = 2;
becomeslet x = 2;
let x=2;
becomeslet x = 2;
func(a,b)
should becomefunc(a, b)
{
at end of line and unindenting for}
Additionally, we should expose this formatter in the vscode extension (see here)
Implementation Notes
Ideally this is something that can be implemented solely with the tree-sitter tree to keep it simple.
Component
No response
Community Notes
The text was updated successfully, but these errors were encountered: