jscheid / prettier.el

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

New major mode js-json-mode in emacs (master) #115

Open jangid opened 2 years ago

jangid commented 2 years ago

This is related to my earlier bug report #101

Emacs (master) aka 29.x release now has a new major mode - js-json-mode. Can we remove the dependency on external package json-mode for Emacs version >=29?

jscheid commented 2 years ago

I think all that's needed here is adding the new mode to prettier-major-mode-parsers. I'll try and find time to do so next week, in the meantime you should be able to patch it up pretty easy. Something like

(add-to-list 'prettier-major-mode-parsers
             `(js-json-mode . ,(cdr (assoc 'json-mode prettier-major-mode-parsers))))