Jade code style: Why is there no other options?

Why is there no option (tabs) for Jade language? In coffeescript I get "tabs and indents, spaces, wrapping and braces, blank kines" tabs. Nothing is shown here. How can I setup Jade rules other than tab size? Using editorconfig would work?

 

8 comments
Comment actions Permalink

yes, .editorconfig should work for Jade.

What code style options do you miss namely?

0
Comment actions Permalink

I'd like to have the same options as those:

(new line after parenthesis or array/arguments when it is long)

Thanks!

0
Comment actions Permalink

Is it about JavaScript code in script blocks? If follows javascript code style settings

0
Comment actions Permalink

I don't understand your question. The last screenshot is my code style for coffeescript, I'd like to have the same with Jade, but I don't have the same options. I thought about somehow add such config using the .editorconfig file but I've never used it before. If you have an example for Jade it would be great, otherwise I'll look at their doc.

I was wondering why Jade doesn't have the same settings at first, would save some time.

0
Comment actions Permalink

I don't understand your answer. Jade is not Coffeescript, there are no array and functions in jade - it's a template language that compiles to HTML. Jade can include javascript, coffeescript, etc. blocks, but they are formatted according to the corresponding language options (doesn't work in all cases because of problems using different code styles for host and injected languages)

0
Comment actions Permalink

Okay, I understand, you're right.

here is an example of our code

gt-top-bar( logo="commons/img/logo-weilbach.jpg" go-to="goToShelf()")
gt-top-bar-links
a.gt-status-links(
ui-sref-active="active"
ui-sref="app.shelf.library"
translate="GT_LIBRARY"
)
a.gt-status-links(
ui-sref-active="active"
ng-click="openModal()"
translate="GT_SHOP"
disabled="true"
)
a.gt-status-links(
ui-sref-active="active"
ng-click="openModal()"
translate="GT_UPDATE"
disabled="true"
)

What we would like instead is
gt-top-bar(logo="commons/img/logo-weilbach.jpg" go-to="goToShelf()")
gt-top-bar-links
a.gt-status-links(
ui-sref-active="active"
ui-sref="app.shelf.library"
translate="GT_LIBRARY"
)
a.gt-status-links(
ui-sref-active="active"
ng-click="openModal()"
translate="GT_SHOP"
disabled="true"
)
a.gt-status-links(
ui-sref-active="active"
ng-click="openModal()"
translate="GT_UPDATE"
disabled="true"
)

I don't know much Jade, it just looked like functions, with parenthesis.
0
Comment actions Permalink

So, you'd like multiple tag attributes to be wrapped and indented? Please feel free to file a request for this feature to youtrack, https://youtrack.jetbrains.com/issues/WEB

0

Please sign in to leave a comment.