jscheid / prettier.el

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

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

Open jangid opened 1 year ago

jangid commented 1 year 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 1 year 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))))