-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge apheleia and/or format-all-the-code and/or reformatter #170
Comments
@raxod502 Thanks for opening the thread! I'm strongly in favor of merging all these packages, and happy to do what I can to help. Don't let me stand in the way of any progress on that front. Unfortunately I'm very busy at the moment, so it's hard to find time for technical work on moving this forward. The best approach from my point of view would be if I grant write access to the format-all repo to someone (or several people) who knows what they're doing. They could then make whatever changes are needed to format-all. |
Of note is that format-all has generally favored a KISS approach ("Keep It Simple, Stupid") to problem solving, and has generally been reliable for that reason. In particular:
I've always favored talking to the maintainers of a formatter to add the required features instead of adding hacks to format-all. That improves things for other editor plugins, too. |
At some point we should sync our stuff with https://github.com/unibeautify -- there should be a standard configuration syntax for code formatters. UB has an RC file syntax from which we could start. The standard config syntax is by far the most important problem to solve in this design space. |
Awesome, I'll start working on some documentation about a proposed way to merge the packages, for review by you and the community. Will update here when that is complete. |
Thanks, sounds great! |
I have a spec for a formatter definition DSL (S-expression-based, but doesn't rely on Emacs) which I designed by converting all the format-all formatters to it. That could be used as the basis for generating formatter definitions for multiple programming languages (or multiple Emacs packages). The thing is who to contact about this stuff. I've worked with Unibeautify's author but he's busy and probably won't have time to work on a standard in this space (though it's been a while, we could ask again). |
Hey guys, I haven't really known how best to contribute to this discussion. For the simple cases (stdin/out, no temp files etc) reformatter works very nicely: it supports more fiddly cases, primarily due to |
IMHO we should insist on that. Everything else is a recipe for problems. There are very few formatters that don't support stdin; we should put some pressure on the holdouts :) |
Here's my write-up: https://nextcloud.intuitiveexplanations.com/s/HxL5CnXKdAqwyPj In case the Nextcloud document ever disappears for some reason, I have saved it on an Internet archive site: https://archive.ph/MN2HB Let me know what you think, @lassik and @purcell.
Curious if we could see what that looks like! It might be a good starting point for what I'm proposing in the doc. |
Any progress on this effort? |
No, unfortunately. It would take me about 2-3 full days to work out the details, and it's hard to find the time. |
Of course. I appreciate you taking the time to respond and for maintaining these packages in the first place. |
Hey @lassik and @purcell, per radian-software/apheleia#31 (comment) I thought I would open a discussion about merging these three packages together, i.e. selecting one to be the basis for development, then adding in the features that are provided by the others, and finally adjusting the remaining ones so that they call into the primary one as a dependency. I'm willing to spend some time on this because it seems like it would be great for the community, regardless of whether it's Apheleia or one of the other two packages that ends up being the basis for the combined package.
Does that sound like a good idea to you? If so, I can make a list of the features provided by the various packages, so that we can decide if it is workable to make a single package that provides all of them.
The text was updated successfully, but these errors were encountered: