jscheid / prettier.el

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

Support Yarn Plug'n'Play #3

Closed asbish closed 4 years ago

asbish commented 4 years ago

https://github.com/jscheid/prettier.el/pull/1

In regards to Yarn Plug'n'Play, I've selected to use setup() function in .pnp.js instead of yarn node because locate-dominating-file is expensive in tramp-mode. However setup() has side effect of enabling to require module in zip archive (patch to fs), so I've changed prettier-processes that will be able to keep node processes per project as much as possible.

By the way, I tried prettier in tramp-mode for the first time and got Error: ENOENT: no such file or directory, open '/tmp/prettier-emacs.71P4GP'. I think it maybe happens only in my environments so I replaced make-temp-file with make-nearby-temp-file and then it works fine.

jscheid commented 4 years ago

Hi, sorry I didn't get back to you about this earlier, as you know the last few months have been... interesting.

This looks great, I'm going to merge it and use it myself for a little while. There are also a few other improvements I want to make (unrelated to this) but I'm aiming to do a new release in a week or so. Thanks again!

PS can we close #1 now?

jscheid commented 4 years ago

This has been released in v0.8.0, thanks again!