-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support for named template strings #2
Comments
Hey! |
I got something partially working, but then ran into some Emacs bugs (for instance this one), so I'll wait until Emacs 30 to try again. |
@guillaumebrunerie is it in a branch? I have the latest version of emacs-30 running, I can test it for you. I can't find the associated commits that Yuan made to fix this issue, if it's a TS issue that should eventually get backported (I think) to the TS package and than you could manually pull that into your version of emacs, assuming 28 or 29, and that should allow you to continue working with the latest version of TS. EDIT: I see it's in master, I'll get my ultimate-js-mode updated and I can continue working on this if you want. |
It's in the main branch, you should just need to uncomment the following lines to try it out ultimate-js-mode/ultimate-js-mode.el Lines 194 to 203 in dcf39e2
For now it's very much a proof of concept, it's hard coded (in several places) to check for a The main issue I had with it was that even though adding a |
Actually, there are also three other lines that need to be uncommented: ultimate-js-mode/ultimate-js-mode.el Line 111 in dcf39e2
I now quickly tried in Emacs 30, and I can confirm that the issue I mentioned above is fixed, but I noticed a few more issues as well, for instance I’m using CSS faces that are only available after loading the regular Have you actually been using |
Yes I have been using ultimate-js-mode for editing UX code because it's handling Lit better than anything else. I use the treesitter version for server-side stuff but for the UX I'm using ultimate-js-mode. I haven't tried your changes yet. I switched to guix last week to evaluate it and haven't figured out how to get emacs 30 installed yet. |
Some frameworks, like lit, use template strings to define HTML and CSS. For example:
Wondering what it would take to add support for that to this mode. Neovim is using treesitter to pull this off, they do it with the following query:
I've tested this in the treesitter playground and it highlights the correct portion of the above JS example. I'm not sure how to turn that query into its own set of nested highlighting though or else I'd make a PR
The text was updated successfully, but these errors were encountered: