jscheid / prettier.el

Prettier code formatting for Emacs.
GNU General Public License v3.0
164 stars 11 forks source link

Default configuration #76

Closed Sleepful closed 3 years ago

Sleepful commented 3 years ago

I like to write the occasional .js script, prettier formats it with the default options

I'd like the ability to define default options when no configuration file is found. Similar to https://github.com/prettier/prettier-emacs#prettier-arguments

jscheid commented 3 years ago

You can put a configuration file somewhere high up in your FS hierarchy, maybe in your home directory. It will affect all files in that directory and sub-directories (unless overridden by a different config file). Does that work?

jscheid commented 3 years ago

I'm going to close this, assuming that the above will let you do what you're after. The ability to specify settings somewhere they won't be picked up when Prettier is run in some other way (e.g. on the command line or in another editor (lol)) is an anti-feature in my opinion.