-
Notifications
You must be signed in to change notification settings - Fork 10
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
Activation through assignment to custom variable #16
Comments
Hmm. That seems like it would be feasible, but I'm not sure that hard-coding it to the FYI, there is an experimental Come to think of it, it might be possible to key off of the Assuming this is a good idea, maybe I can investigate this a bit further. Regarding implementation, we'd have to fight for precedence over the syntax plugin. Note to self: :syntax region anotherHtmlRegion start=" `[\n\s]*<" end=">[\n\s]*`" |
Hi @jonsmithers, thank you for your quick reply! You are right, I had not seen the new I can't think of many drawbacks regarding the Thanks again for this great plugin! |
@jonsmithers until now your new |
Trying this plugin now and came upon this issue as well! Could it be possible to do like what Prettier does? If a template literal starts with either the E.g. const html = /* HTML */ `<div>Click</div>` |
@pablo-abc did you ever find a template literal syntax highlighting solution that works using a comment like that ? @schrotie has a PR on this that adds what you describe, but it didn't work for me: |
So, I just checked: I'm using this plugin, git says I'm on the same state as this repo ("master"). My vimrc only has |
thx, me too but for some reason it only catches if I use the html function but not /* html */ (ie- works for lit-html or uhtml calls but not for raw string literals). I will have to try on a fresh install. |
Hi @jonsmithers, you made a really useful plugin here, thank you!
I would like to ask if it would be possible to activate the highlighting not only through the tagged template function call but also through an assignment to a custom variable. For example:
Many people don't use
lit-html
very frequently but make custom templates by assigning the html or css strings to variables first. In other words the pattern matching had to resolve toconst html =
instead ofhtml`
.What do you think? Thanks you!
The text was updated successfully, but these errors were encountered: