prettier / plugin-pug

Prettier Pug Plugin
https://prettier.github.io/plugin-pug
MIT License
199 stars 43 forks source link

Option for disabling formatting of Class and ID literals #36

Closed Shinigami92 closed 4 years ago

Shinigami92 commented 5 years ago

Let the user decide if the formatter should format Class and ID literals or not


based on #32

Shinigami92 commented 4 years ago

@lehni Do you also want to work on some of these help wanted issues?

lehni commented 4 years ago

@Shinigami92 at the moment only things that I need for my own use-case of the plugin. Once these things are taken care of, if I find the time and have an idea for how to do it, why not!

SkyaTura commented 4 years ago

I pretend to do it this weekend 🤗


Edit:

It happened to be a little more complicated that I thought it would be.

Still, I made some progress. :)

SkyaTura commented 4 years ago

@Shinigami92 my original intent was to provide 3 options:

HOWEVER, as far as I understood, the plugin would need a huge refactor (or an ugly workaround) to allow a new attribute to be set, specially in cases where there is no attribute at all in the element.

I'm considering to release only the first two options, which is already working fine.

What are your thoughts about it?

Shinigami92 commented 4 years ago

@SkyaTura Yes I also saw this potential of options :smiley:
The thing is, if we now release it with just enabling/disabling (boolean flag) possibility, we cannot change it later on without a breaking release

So maybe we should keep this potential feature in mind (outsource it to a new issue) and implement your current PR with a choice option

SkyaTura commented 4 years ago

As soon as I have some time I'll do it ;)

Shinigami92 commented 4 years ago

Take your time, it's just a new feature and I don't even know if many want and will use this feature ^^' Would be cool if I could somehow get statistics from it ^^

basaran commented 4 years ago

Related to #165

Some editor extensions are having a tough time providing intellisense auto completions (vetur) when the intellisense is invoked inline on a pug file.

This is not an issue with the plugin-pug, but it would be extremely helpful to have an option to disable inlining of css class names during development.

Option can be called something like pugTagCss

Please see the recording:

inline_classes

Shinigami92 commented 4 years ago

@basaran So I invited you with write permissions to our repo This allowes you to create branches and modify branches except the master branch master branch is readonly for you

This is useful because you don't need to create a fork and we can work together on this feature

So now you have two options:

  1. Wait on @SkyaTura and ask him if you can help him with his PR?
  2. Open a second branch and make a competition 😛 The better branch wins 😅

Keep in mind: always have fun and keep friendly 😁

Shinigami92 commented 4 years ago

Oh, one thing I forgot: If working together on one branch => DON'T use rebase/force-push

basaran commented 4 years ago

Arigatou Gozaimasu :) I will be happy to help in anyway I can

SkyaTura commented 4 years ago

I was having some hard time re-learning how to type on my new split-ortholinear keyboard, but now that my WPM and accuracy are acceptable again I can finish my work here.

But I'm still open to ideas of how create an attribute when class/id are unset to implement the attribute mode.