prettier / prettier-emacs

Minor mode to format JS code on file save
http://jlongster.com/A-Prettier-Formatter
372 stars 53 forks source link

Allow specifying diff program #56

Open sirn opened 5 years ago

sirn commented 5 years ago

On some systems such as OpenBSD, the diff program does not support some of the features available under GNU diff, e.g. --strip-trailing-cr. AFAIK, there's no way to reproduce the behavior of --strip-trailing-cr without piping to tr or sed (which is probably not ideal).

So I think it might make sense to allow specifying diff program, so I can install gdiff and configure prettier-emacs to use it. This PR basically add prettier-js-diff-command to defcustom, and use it in place of the existing diff string.

Thanks!

Aankhen commented 4 years ago

This would be very useful to have.