-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start with tab in vue component #140
Comments
So you requesting something like vue-files-script-and-style-tags-indentation, but I'm thinking about if we should ask prettier itself to do this instead of my plugin 🤔 |
I don't think Prettier going to accept it, especially the |
Ok, then we need to implement this option into the plugin |
I don't think it's good idea to name it E.g. embedded in markdown, I do not think it's a useful option, cause there is no use case where it's useful |
From my understanding Vue is the only js framework that has single-file components and uses HTML or pug in this way. The other SFC frameworks I know of are react and svelte. Both have different syntaxes. |
Svelte has single-file components, and from my understanding you can use pug for templates there too: |
Ok so Maybe |
|
I don't like it, cause markdown is also embedded and will not be indented |
I think we should go with ... but ... now I see that could colide with e.g. vue's Maybe |
I started (quite finished ^^) this feature request Also I think the current tests are not well enough to handle some special cases @fisker Is there a way I can find out that the code is currently embedded in a Cause someone wants to provide examples in a |
Wow thank you @fisker I also need to add these both to DefinitelyTyped |
Ok last step is missing: give it a stable name
|
But markdown does not have anything to do with |
This sounds quite obscure I think.
This is better, but it's not really the indentation of the component, it's the indentation of the pug template inside the component…
Probably the best one of the options!
I don't think
|
@lehni Thanks, that was helpful For <template lang="pug">
v-tooltip(bottom)
//- vvv Below is a "template"-tag
template(v-slot:activator="{ on, attrs }")
v-btn(v-on="on", v-bind="attrs", color="primary", dark) Button
span Tooltip
</template> That is what I meant with a template tag |
How about |
It's not |
|
Finally some new types from DefinitelyTyped arrived I made my decision to @lehni Could you have a last review over my PR, then I will merge it and provide a new release |
@Shinigami92 very swamped with work these days, I don't think I'll find the time for another 10 days or so :/ Regarding naming: I would expect |
I think it's ok, I will merge it now |
Probably too late now, but I just found out that Vetur has this setting here:
|
Yeah, I already created a release |
Request / Idea
First of all thanks for this library!
I usually start my pug with two spaces or 1 tab in my Vue template. I have recently installed prettier 2 and prettier pug and I have not found this option yet. I searched through the options but I could not find one to satisfy this need. Maybe I looked over it.
Input
Expected Output
The text was updated successfully, but these errors were encountered: