emacs-format-all-the-code icon indicating copy to clipboard operation
emacs-format-all-the-code copied to clipboard

Allow a formatter rule to override the executable name

Open knu opened this issue 2 years ago • 0 comments
trafficstars

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"))))

knu avatar Oct 26 '23 05:10 knu