Glavin001 / atom-beautify

:mega: Help Wanted - Looking for Maintainer: https://github.com/Glavin001/atom-beautify/issues/2572 | :lipstick: Universal beautification package for Atom editor (:warning: Currently migrating to https://github.com/Unibeautify/ and have very limited bandwidth for Atom-Beautify Issues. Thank you for your patience and understanding :heart: )
http://unibeautify.com/
MIT License
1.5k stars 454 forks source link

Doesn't recognize .ejs file extensions #1403

Closed jer244 closed 7 years ago

jer244 commented 7 years ago

There are no file extensions listed for EJS files.

ejs beautify

Get the following error when trying to beautify .ejs files:

Atom Beautify could not find a supported beautifier for this file Atom Beautify could not determine a supported beautifier to handle this file with grammar "EJS" and extension "ejs". If you would like to request support for this file and its language, please create an issue for Atom Beautify at https://github.com/Glavin001/atom-beautify/issues

I have:

prettydiff commented 7 years ago

Odd, I see a file dedicated to EJS: https://github.com/Glavin001/atom-beautify/blob/master/src/languages/ejs.coffee

I will mark this as a bug.

prettydiff commented 7 years ago

@jer244 You can probably fix this by including ejs in the extensions array of that file I linked to. Just submit a pull request and it will be merged into the project.

jnewth commented 7 years ago

@prettydiff Your fix (that is, adding "ejs" to "extensions" in .atom\packages\atom-beautify\src\languages\ejs.coffee) works. The formatting doesn't look as good as what atom-beautify usually creates, so maybe there is a follow-on improvement to ejs formatting? (Im an EJS n00b but maybe someone has something).

prettydiff commented 7 years ago

@jnewth It seems that Pretty Diff is the default beautifier for that format. Some solutions to improve beautification are:

Glavin001 commented 7 years ago
Glavin001 commented 7 years ago

Published to v0.29.15