All,
Based on my past threads and the conversation with @madskjeldgaard on the Tree-Sitter thread, I have started work on creating a code formatter for SuperCollider code.
The idea is to function similar to the Black formatter for Python, the clang-format for C++ code, and gofmt for go code, where the formatter does not exist within an editor, but rather is its own command line process that can then be imported via plugin into an editor.
The organization of the code is fairly straightforward - the sclang_format script is a wrapper around the format functions defined in the format_rules, and it currently takes in both a code file and a treesitter language object. This will likely change in the future, but itās good for now.
This doesnāt even work right now, but Iām going to be hacking on it and would love to get people involved to start the development. Hopefully it wonāt take too long, but the devil is always in the details.
Repo is here: