pushqrdx / vscode-inline-html

🎨 Adding Syntax Highlighting, Emmet, IntelliSense support for ES6 Template Strings in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=pushqrdx.inline-html
GNU General Public License v3.0
54 stars 15 forks source link

Activate using /* HTML */ so Prettier works alongside Inline HTML #44

Closed conor-dowdall closed 8 months ago

conor-dowdall commented 9 months ago

Wonderful Extension! Thank you.

Prettier doesn't format my template literals unless /* HTML */ is used. Inline HTML only works with /* html */

Could the two be combined by adding /* HTML */ to Inline HTML's recognised comments?

pushqrdx commented 9 months ago

@conor-dowdall alright. just to be sure you mean capital HTML as well as small html right?

conor-dowdall commented 9 months ago

Thanks for your reply @pushqrdx Yes, but Prettier actually requires spaces around the capital HTML too! So /* HTML */ as opposed to /*HTML*/.

This extension is really helpful, so thanks!

The only pain point still left is when I hit Control+/, HTML comment syntax is inserted, even if I am in a CSS style tag. I don't know if there's anything that can be done on your end for that? (getting greedy now!)

pushqrdx commented 9 months ago

@conor-dowdall

/ HTML / as opposed to /HTML/

I am pretty sure that the spaces already work but I see

The only pain point still left is when I hit Control+/, HTML comment syntax is inserted, even if I am in a CSS style tag. I don't know if there's anything that can be done on your end for that? (getting greedy now!)

Yeah, I think there's another bug report about this, I've never actually figured out why does it do this, but I'll try to give it another shot.


I'll try to squeeze in an update as soon as possible.

conor-dowdall commented 9 months ago

That's great - it's hard to find the time sometimes. You get so used to the conveniences in VS Code, that it's hard to live without them! You're making web components much easier to work with, so thank you!

zengadget commented 9 months ago

Very nice, prettier works with / HTML / good to know! In the meantime you can put both /* HTML */ /*html*/ and it will code complete and format with prettier :).

conor-dowdall commented 9 months ago

Oh, that changes everything! It's nice to work with web components in VS Code now!

pushqrdx commented 8 months ago

@conor-dowdall @matejukmar Added support for case insensitive blocks, I was planning to pool this along with other changes, but I have taken the opportunity to complete @Luxemburgo 's PR and push a minor update v0.3.9 which should be up in the marketplace now.

Give it a go and tell me if everything is good. And sorry for the delay :)

conor-dowdall commented 8 months ago

That is perfect. With just / HTML / as a comment before my template string, I get Prettier, auto-complete, and highlighting. It's wonderful! Thank you @pushqrdx and @Luxemburgo.