-
Notifications
You must be signed in to change notification settings - Fork 203
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
Angular2 Decorator Template Highlighting #798
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Added simple support for Angular2 inline template highlighting. In short, if we find something that looks like this: @component({ template: ` <some><html><here></here></html></some> ` }) We activate text.html.basic highlighting on the contents of the multiline string. It's possible that we could look specifically for @component, but right now, we're piggybacking off of #decorator to prevent weirdness/code duplication. To make this work, I had to remove the $base include from #decorator. If people begin passing anonymous functions and so on to decorators, this will need revisiting. But right now, we're talking about booleans and objects, so I don't know that it really needs $base. If it does, probably better to just catch @Component->template on its own.
Removed placeholder styles that were helping me track my selector during testing. 'template' should be formatted like the rest of the decorator attributes.
Thanks. Work with #675 should preserve this 🌹 |
basarat
added a commit
that referenced
this pull request
Jan 2, 2016
Angular2 Decorator Template Highlighting
Thanks guys! I was looking forward to this feature. 👏 |
Note that we are about to get automated upstream grammar : #813 That will lose this work. A PR modifying |
So, how do I active this? I am using version 8.1.0 and syntax highlighting isn't available for template strings. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added simple support for Angular2 inline template highlighting. In short, if we find something that looks like this:
@component({
template:
<some><html><here></here></html></some>
})
We activate text.html.basic highlighting on the contents of the multiline string.
It's possible that we could look specifically for @component, but right now, we're piggybacking off of #decorator to prevent weirdness/code duplication.
To make this work, I had to remove the $base include from #decorator. If people begin passing anonymous functions and so on to decorators, this will need revisiting. But right now, we're talking about booleans and objects, so I don't know that it really needs $base. If it does, probably better to just catch @Component->template on its own.