-
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
Configuration, customization, hooks #2
Comments
I thought about this some more. The domain model from the user's point of view would seem to be:
The domain model we need in software would be:
But I would really like to avoid coding and maintaining such mappings in Emacs. It sounds like a very thankless job, without a clear payoff, and difficult to do well. What's important to note here is that in no case should We could also let the user set command line switches for each formatter, but I think that's a really bad fit to the above model - it re-uses neither Emacs own variables, nor the proposed universal style settings, but introduces a third set of redundant settings to concern ourselves with (actually, N extra sets, since many formatters are again bound to have different names for the same things). |
TL;DR: This is a social problem, not a technical one. Let's be social. What I'd really like us to do:
|
As someone who almost always works on single files, I'd appreciate if this package never demanded local configuration and other such things. This package is very important to me - I've started and quit switching to Emacs for the first time because of a lack of a universal formatting frontend. |
From the MELPA PR thread:
@lassik: I thought some more about the minor mode and
before-save-hook
and the customize variables and I'd like to hold off on those for now because It's far from obvious how to do them right.The thing is that everyone working on a particular codebase should really be using the same external formatter with the same settings (whether they use Emacs, Vim or any other editor). Otherwise version control diffs will eventually turn into a mess and much of the point of auto-formatting in the first place is moot. This implies that formatter settings should really be stored in an editor-independent file that is checked into version control. (Ideally some existing settings file such as
.editorconfig
would be extended for this purpose instead of making Yet Another Dotfile with its own syntax and filename globbing rules :))So basically, I think any effort that we spent putting code formatting settings in Emacs would only serve to detract from the much more important goal of specifying a unified cross-editor settings file. We should work together with people from the Vim, Atom and other communities to make it a reality sooner. Once a de facto cross-editor standard is agreed upon, we can then add a global minor mode for Emacs and people can leave it always enabled and not worry about configuring it specifically for Emacs. (EDIT: Maybe we should just wait for Unibeautify to finish this, they already have this: https://unibeautify.com/docs/config-file.html)
@purcell: I get your point about standardising configuration into .editorconfig etc., and supporting such a thing is a worthy goal that isn't in conflict with providing good Emacs-only configuration for the package: if format-all had a very Emacs-oriented configuration system, then it would be easy to translate settings to it from any editorconfig standard that might arise.
The text was updated successfully, but these errors were encountered: