lassik / emacs-format-all-the-code

Auto-format source code in many languages with one command
https://melpa.org/#/format-all
MIT License
613 stars 106 forks source link

format-all not formatting json files #171

Open parrotcar00 opened 2 years ago

parrotcar00 commented 2 years ago

I've installed jsonnnetfmt such that which jsonnetfmt gives the location for the binary.

I then opened a foo.json file and did: M-x format-all-buffer at which point, I get the prompt: Formatter for Javascript:

I entered prettier and I as you would expect I get an error because it's trying to use javascript formatter on json file.

Am I doing something wrong? How do I use format-all to format json files?

lassik commented 2 years ago

If the buffer in js-mode or json-mode? format-all uses the Emacs mode to determine the programming language.