-
Notifications
You must be signed in to change notification settings - Fork 108
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
Unibeautify integration #7
Comments
I can try to make Unibeautify's installation easier, as described in Unibeautify/cli#17 . Would you be able to work on the Emacs package? I created a repository and provided you with write access: https://github.com/Unibeautify/emacs |
That's awesome!
Thanks for granting access. I was under the impression that we were adding Unibeautify support to format-all. I still think that would be a better solution than creating a separate package. We have a ready and tested framework into which we can easily add Unibeautify support and there's no need to throw away all the old work on calling other formatters. I believe not all Emacs users want to or are able to install Unibeautify right away so the old code in format-all would continue to serve them. Meanwhile, everyone would get Unibeautify support with the next update to format-all. Before I started format-all, there were a dozen or so formatting packages for Emacs - a different package for autopep8, clang-format, prettier, rubocop, rufo, etc. All need to be installed separately and have a slightly different user interface. They all do the same thing with small variations but are different packages mainly due to historical intertia. I would like to avoid adding to this duplication of code, UI and effort in the Emacs package ecosystem. In my opinion a good compromise would be to make Unibeautify the default formatter for format-all. I would happily do this. So if Unibeautify is installed, format-all would use it - if not, it would try to directly call the other external formatters that it already knows about. (There is no incentive for me to add new formatters to format-all once Unibeautify is working well, but I imagine someone would send the odd pull request once in a blue moon.) The big thing that Unibeautify brings to Emacs (in addition to a wide range of formatters) is configuration. My original goal was to avoid inventing our own Emacs-specific configuration system (this problem is explored in painful detail in issue #2). Unibeautify solves the problem beautifully by providing a One thing I would be willing to consider is changing the name of the Emacs package. I never thought that I'm not familiar with the Vim community but I imagine a similar approach would serve them well - they already have a widely used plugin called Neoformat. Unibeautify could be added to that one instead of making an entirely new plugin from scratch. But we should ask @wbthomason since he knows about Vim and Neoformat. |
👍 This does sound like a good compromise 😃 .
No worries here. I think you should continue to maintain your Ideally, the name and installation is fairly consistent: # Node.js
npm install unibeautify
# macOS
brew install unibeautify-cli
# VSCode
code --install-extension Glavin001.unibeautify-vscode
# Sublime Text (via Package Control)
# --> Package Control --> Search for "unibeautify" --> Install
# Vim
:Neoformat unibeautify
# etc ... The Unibeautify Emacs package will be extremely lightweight and simply leverage Since you already have developed out this excellent package, |
Wow, that is very impressive. Atom is really taking off! I thought about this some more and had to change my mind. I now agree with you that having a separate For the best Unibeautify support in Emacs, we should:
All of these are hard to fit in the current format-all package without confusing users.
I also looked at the current Emacs Lisp code for format-all and the part that does the actual formatting is a very small amount of code. So I could volunteer to kick off the Unibeautify Emacs package based on that code. After all this reflection, I think it's the right thing. |
Thank you in advance for your contribution! I am excited to have you on board 🎉 😃 . Together let's build the best user experience for code formatting! All of your comments above make good sense and we can continue our discussions over at https://github.com/Unibeautify/emacs/issues 👍 |
This project is continued at https://github.com/Unibeautify/emacs :) |
The Unibeautify folks are very friendly and responsive and would like to hook into Emacs. So let's do it!
Initial discussion here: Unibeautify/cli#17
Ping @Glavin001 :)
The text was updated successfully, but these errors were encountered: