-
Notifications
You must be signed in to change notification settings - Fork 93
chore: add vscode highlight extension #228
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
Conversation
It's happening so fast! I'll try it soon and give feedback. |
Nice to Have (too much for MVP)
|
}, | ||
"renderTemplate": { | ||
"contentName": "text.html", | ||
"begin": "\\G\\s*([`|'|\"])", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it disallows line breaks between render(
and the arguments.
Note that the regular expressions are matched against only a single line of the document at a time. That means it is not possible to use a pattern that matches multiple lines. The reason for this is technical: being able to restart the parser at an arbitrary line and having to re-parse only the minimal number of lines affected by an edit. In most situations it is possible to use the begin/end model to overcome this limitation.
https://macromates.com/manual/en/language_grammars
How about just
([`|'|\"])
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
\\G
is "matching start position", so maybe it means \\G
is the same line of render(
.
I've tried to fix the grammar.
|
Thanks so much for the feedback! ♥ |
@lacolaco there's a new version available with your fixes, thanks again! |
Syntax highlights seems perfect! I think formatting and completion can be handled by our own TS plugin which communicates with language service. I found the lit-html extension, which includes its own TS plugin. The extension has formatting configuration and passing it to the plugin. https://github.com/mjbvz/vscode-lit-html |
Yea, I also using lit-html as an example 😅 I will do some reading about it first and maybe in a couple of days/weeks play with it to see how easy or hard it's to support this feature. |
🎉 This PR is included in version 10.8.3 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
What do you think @lacolaco ?
I would love that you tried it out before I merge this in.
As far as I can see everything works except the emmet plugin, which I can take a look at later.
But it should be good enough for a MVP 🙂
It's already published in the marketplace as vscode-atl-render.
Closes #227