-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add Glimmer JS language #6578
Add Glimmer JS language #6578
Conversation
@lildude would you mind running the CI for me? Want to make sure I didn't make a mistake this time 😅 Never mind – got it running in my fork ✅ Believe we are now meeting the usage requirements, too 🎉 |
really excited for this! looks like we're no longer "Pending Popularity" |
Not quite. Excluding forks drops things down to ~1.8k. |
can we include markdown which references gjs? (that's at 2k 🥳 ) update: we're over 2k non-markdown files now :D |
@lildude It looks like gjs without markdown and excluding forks is now at 2k. |
Heads up: this language won't be using the most up-to-date version of the grammar when it is released to GitHub as a duplicate scope has been added to that repo since this PR was created.
|
Actually, now I look at this more closely, it appears this grammar was added with that conflict already in place suggesting Please resubmit when the issue with the upstream grammar has been fixed. |
Is there a way to tell afaict, The upstream grammar is correct for ember users, and no ember user should ever be using For ember projects using the |
Oh, sorry about that 😓 . I used We discussed this in the public feedback PR before this one was raised. Is there any way to proceed without removing handlebars from the upstream grammar? It's needed for in-editor support of Ember-flavoured handlebars. But ideally it's ignored in Linguist... 😅 |
Not really. Linguist, more specially the highlighting engine, only has support for one grammar scope per language and it doesn't have a mechanism for overriding. Generally grammars inherit and extend upon other grammars using a different scope name if they want something to behave differently from the original grammar. The closest option to forcing is by replacing the current Handlerbars grammar with that supplied by vsc-ember-syntax. This comes with the consequence that that project will now be responsible for the syntax highlighting of all handlebar files, not just Ember users.
And there's the problem. If the file and syntax is not handlerbars, the grammar should not be using the same scope name. It should be using its own scope and either completely defining everything it supports or inheriting from the handlebars grammar and overruling the differences. This is common practice.
Not unless there's something in the files themselves that is unique to ember. Linguist looks at files in isolation (think gists) to try and determine the language which is then fed to the highlighting engine. If the files are definitely not handlebars and should have their own grammar, then they can be added to linguist as their own language but the grammar will still need to use a unique scope name. |
Yes, however that's just painting over the problem and incorrect behaviour I just highlighted above. |
Description
Adds support for Glimmer.js which will be the component authoring format of the next Edition of Ember.js.
Checklist:
#F5835F