Hi,
What is the solution for html syntax in template literals with Sublime Text 4 ?
Thanks.
Hi,
What is the solution for html syntax in template literals with Sublime Text 4 ?
Thanks.
Ignore my answer and use the one below.
this is the settings I used to get it to work
"configurations": {
"HTML Recipe": {
"typescript":true,
"custom_templates": {
// To highlight any untagged template as HTML
"default": "scope:text.html.basic",
"lookaheads": {
// To highlight `<div>Hello, World!</div>`
"<": "scope:text.html.basic",
},
"comments": {
// To highlight /*html*/`<div>Hello, World!</div>`
"html": "scope:text.html.basic",
},
"tags": {
// To highlight html`<div>Hello, World!</div>`
"html": "scope:text.html.basic",
}
}
}
}
}
well that failed and got a recursion limit on big files this package seems to work though
https://packagecontrol.io/packages/LitElement%20Syntax%20Highlighting
I wouldn’t recommend those solutions anymore as with_prototype
is well known to cause syntaxes to hit 25k contexts sanity limit.
JSCustom supports various ways to add such extensions to JS/TS in more elegant ways. AFAIK it also supports template literals.
Thanks for the replies.
JSCustom is not working for me. But the Lit Element is working well.
Thanks.