otovo / htmx-tags

HTMX Tag completion for VSCode
Apache License 2.0
44 stars 9 forks source link

template literal support #6

Open mfulton26 opened 12 months ago

mfulton26 commented 12 months ago

Various tools support JavaScript template literals prefixed with an "HTML" comment. VSCode provides syntax highlighting for the following and Prettier will format it too:

const html = /* HTML */ ` <script src="https://unpkg.com/htmx.org@1.9.6"></script>
  <!-- have a button POST a click via AJAX -->
  <button hx-post="/clicked" hx-swap="outerHTML">Click Me</button>`;

I'd like to see htmx-tags support HTMX attributes inside JavaScript template literals too.

erhanertem commented 5 months ago

Indeed, its needed. Too bad that currently no tool in vscode marketplace supports that.