(Glimmer JS) Embedded grammar not working #6647
Replies: 5 comments 8 replies
-
For reference this is how that broken file looks in vscode ![]() |
Beta Was this translation helpful? Give feedback.
-
Poking at this some more. I modified the NovaLightshow tool so I could paste a second grammar it can use to embed. Resulting in what I'd expect to see I believe our grammar currently works in vscode because we use So we could theoretically merge those files in with our Does that sound correct to you @lildude? |
Beta Was this translation helpful? Give feedback.
-
I also forgot we have these as part of our package.json, again, which isn't going to work here. {
"injectTo": [
"source.js",
"source.ts"
],
"scopeName": "inline.hbs",
"path": "./syntaxes/inline-hbs.json",
"embeddedLanguages": {
"meta.embedded.block.html": "handlebars"
}
} |
Beta Was this translation helpful? Give feedback.
-
As an aside, this could also be related to the issue found by @Alhadis at #6603 (comment) |
Beta Was this translation helpful? Give feedback.
-
Thanks for looking at this quickly @lildude :) I think we have a way forward upstream, we're going to build the grammars and merge inline.hbs and inline.template into our source.gjs and source.gts files so we avoid the duplication across the grammars. It works in my forked version NovaLightshow (source.gjs embedding text.html.ember-handlebars), so I'm hopeful it'll also work on github. The next release will likely be in March 2024, is that correct? Also I took a look at the compiled grammars from the release and I noticed |
Beta Was this translation helpful? Give feedback.
-
We recently had support for
glimmer-js
files merged in but we are seeing issues related to the ember flavoured handlebars not highlighting correctly (or at all).Based on this textmate grammar repo https://github.com/lifeart/vsc-ember-syntax/tree/master/syntaxes
A broken example can be seen here https://github.com/NullVoxPopuli/limber/blob/main/apps/tutorial/docs/12-loading-patterns/1-keeping-latest/answer.gjs
Our grammar works fine in vscode, by merging everything into a single grammar file I was able to get something that mostly matches (at least according to https://novalightshow.netlify.app/) but it will mean duplication for the typescript variant
glimmer-ts
and we'd much prefer to use embedding so we can keep the handlebars grammar separated.Is there something we are missing that would fix this without needing to merge everything down to one file?
This is the merged version of the grammar
Merged Grammar
Beta Was this translation helpful? Give feedback.
All reactions