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 453 forks source link

Add Pug (formerly Jade) support #199

Closed jerone closed 8 years ago

jerone commented 9 years ago

Would be great if atom-beautify supported Jade template language. :+1:

:x: Unsupported language for grammar 'Jade'.

jonadeline commented 9 years ago

+1

scarnago commented 9 years ago

I love this atom plugin, but I need Jade template language support

+1

mez commented 9 years ago

I was just going to suggest this!

Glavin001 commented 9 years ago

@prettydiff is this something Prettydiff could support? I have not found another yet.

prettydiff commented 9 years ago

No, this one will not be supported by Pretty Diff. I used Jade before and it is a fantastic idea to write HTML faster, but unfortunately it is white-space and grammar based instead of syntax based. There is nothing in Pretty Diff to accommodate this language without writing a new parser from scratch.

Glavin001 commented 9 years ago

Makes sense. I believe there was a “pretty” option in Node.js’ Jade package, I’ll look into that later. Thanks.

On Mar 16, 2015, at 2:07 PM, Austin Cheney notifications@github.com wrote:

No, this one will not be supported by Pretty Diff. I used Jade before and it is a fantastic idea to write HTML faster, but unfortunately it is white-space and grammar based instead of syntax based. There is nothing in Pretty Diff to accommodate this language without writing a new parser from scratch.

— Reply to this email directly or view it on GitHub https://github.com/Glavin001/atom-beautify/issues/199#issuecomment-81813117.

jerone commented 9 years ago

@Glavin001 commented on 16 mrt. 2015 18:08 CET:

The pretty option from Jade is only to prettify the generated HTML (newlines & indentation), not the jade files themselves.

josh-egan commented 9 years ago

+1 for adding Jade support :smiley:

ghost commented 9 years ago

+1 plz need Jade support!

Glavin001 commented 9 years ago

I currently do not know of any beautifiers that handle Jade. If you know of one let me know. Thanks.

GuidoS commented 9 years ago

+1 plz

Glavin001 commented 9 years ago

Could users provide with some small examples of input and expected beautifier outputs? I cannot find a beautifier to support Jade however maybe one could be made for the specific usage that each of you users needs. A lot of posts I am finding about Jade beautification / formatter state simply that since it is a whitespace based language it should implicitly be formatted correctly, by the user. So providing some clear examples to me would help me fine tune exactly what needs to be done. Thanks!

pjbrow commented 9 years ago

+1 from me too, and good point @Glavin001 - I've been waiting for someone to say this. I think what everyone has in mind would do a lot less than a beautifier for JS or HTML. Here's an example I come across quite often that I'd use it for.

Input: Excess tabs - you might have deleted something in between.

div.first-div
        div.first-sub-div
            p First paragraph
        div.second-sub-div

Output: Excess tabs gone.

div.first-div
    div.first-sub-div
        p First paragraph
    div.second-sub-div
jerone commented 9 years ago

I can think of the following actions a beautifier could solve (maybe some are more linters):

Edited 15 January 2016

prettydiff commented 9 years ago

@jerone could you provide an example of negated condition syntax, self closing tags?

You likely would not get the 4th and 5th bullet points from a beautifier. Software would not be intelligent enough to know where a code author makes mistakes in opposition to their intentions. At that point the code should be allowed to be broken and the code author should test it and fix it accordingly. A beautifier attempting to make this decision will always be wrong at some point.

myrtleTree33 commented 9 years ago

+1

vingorius commented 9 years ago

+1

vingorius commented 9 years ago

Another Jade Beautify

I made a tiny 'jade beautify' for myself. Everyone can install it, just search 'jade beautify'. and welcome feedback.

Source: https://github.com/vingorius/jade-beautify

Enjoy jade.

Glavin001 commented 9 years ago

@vingorius: Awesome! Would you be interested in:

Great work! Thanks.

vingorius commented 9 years ago

@Glavin001 Thanks for your suggest. I'll check.

ryanpcmcquen commented 8 years ago

+1, @vingorius let me know if I can help in any way!

vingorius commented 8 years ago

Thanks @ryanpcmcquen . I had checked atom-beautify. it was too huge to understand as a beginner of coffeescript.

If you can help me, it's very appreciated.

jaseeey commented 8 years ago

+1, I would love to see this integrated into this package, then it would be complete for me!

pauljakobwhite commented 8 years ago

+1

danielbayley commented 8 years ago

+1.

ThorstenHans commented 8 years ago

keep me posted (or short +1)

jonreader commented 8 years ago

+1

Glavin001 commented 8 years ago

If someone could publish to npm a jade beautify package that Atom Beautify could use then I could quickly add support for this by following the instructions found at https://github.com/Glavin001/atom-beautify/blob/master/docs/add-languages-and-beautifiers.md#how-to-add-a-beautifier-for-a-language . /cc @vingorius

Glavin001 commented 8 years ago

Jade is changing its name to Pug: https://github.com/pugjs/jade/issues/2184

ErikBoesen commented 8 years ago

+1

Glavin001 commented 8 years ago

I will be adding Jade support this weekend, thanks to @vingorius! If someone would like to create a Pull Request adding support, the package can be found at https://github.com/vingorius/pug-beautify and let me know if you need any help. Thanks!

cgdeboer commented 8 years ago

@Glavin001 is there an update on this. I would be a huge fan of atom-beautify supporting pug(jade).

Glavin001 commented 8 years ago

I haven't had a chance to finish adding Jade support. However, I have moved this back to v0.29.0 milestone, so I want it to be in the next release. :+1:

Glavin001 commented 8 years ago

Published to v0.28.28

cgdeboer commented 8 years ago

Thanks. This is great !