lassik / emacs-format-all-the-code

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

Allow a formatter rule to override the executable name #246

Open knu opened 10 months ago

knu commented 10 months ago

This introduces a keyword symbol :executable to format-all-formatters.

It solves a typical problem where the predefined formatter is just fine but the executable you want to use instead is installed under the project working directory or elsewhere not necessarily in the default PATH.

e.g.

(setq format-all-formatters
      '(("JavaScript"
         (prettier
          :executable
          "node_modules/.bin/prettier"))))