Skip to content
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 language #1

Closed
wants to merge 9 commits into from
Closed

Add Glimmer language #1

wants to merge 9 commits into from

Conversation

gilest
Copy link
Owner

@gilest gilest commented Sep 22, 2023

Description

Adds support for Glimmer.js which will be the component authoring format of the next Edition of Ember.js.

Checklist:

script/add-grammar https://github.com/lifeart/vsc-ember-syntax

Note: I removed `text.html.handlebars` from the `vsc-ember-syntax` in grammars.yml to (hopefully) avoid conficting with the existing Handlebars syntax which is also provided by `vsc-ember-syntax`.
- inline.hbs
- inline.template
- source.gjs
- source.gts
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I manually removed text.html.handlebars from the vsc-ember-syntax in grammars.yml to (hopefully) avoid conficting with the existing Handlebars grammar.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good thinking -- because ember doesn't use handlebars anyway

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right and we don't want to disrupt users of .hbs/Handlebars (ember or otherwise) with this change.

Comment on lines +323 to +328
- extensions: ['.gts']
rules:
- language: Gerber Image
pattern: '^G0.'
- language: Glimmer
negative_pattern: '^G0.'
Copy link
Owner Author

@gilest gilest Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be a bit naive but this is covered by a heuristics test which I think checks the samples/* files 🤷🏻

@NullVoxPopuli
Copy link

Nice! So excited for this! Thank you!!

extensions:
- ".gjs"
- ".gts"
ace_mode: javascript

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to add gjs/gts support to the ace editor?

I wrote a parser/syntax package for codemirror 6 -- i wonder if it's similar?

Copy link
Owner Author

@gilest gilest Sep 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From the docs:

A String name of the Ace Mode used for highlighting whenever
a file is edited. This must match one of the filenames in https://gh.io/acemodes.
Use "text" if a mode does not exist.

So a full ace mode would probably improve the web editing experience. I don't think that should block this though. We can update that field in a follow-up.

gilest and others added 3 commits September 22, 2023 14:26
Because otherwise it fails the TestGrammars#test_readme_file_is_in_sync test.

Not sure why this URL is considered not in sync. Maybe because of `ace_mode: javascript`?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants