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

Refactor script/style/template lang attribute contexts #7

Merged
merged 2 commits into from
Nov 18, 2024

Conversation

deathaxe
Copy link
Member

@deathaxe deathaxe commented Nov 18, 2024

Resolves #3

This PR...

  1. introduces named contexts for each embedded script/style/template language.

    Most of them have been copied from Svelte with some gaps filled.

  2. adds support for JSX/TSX scripts

Note: For details, please refer to commit messages.

deathaxe added 2 commits November 18, 2024 18:00
This commit...

1. copies most script/style embedding contexts from Svelte to add named
   contexts for each embedded script and style syntax.

2. scopes `lang="..."` attributes `meta.attribute-with-value.lang`
   to support lang value completions

   see also: sublimehq/Packages#4079

3. also accepts `language="..."` as synonym for `lang="..."`,
   as it has been seen in various other languages and has therefore also been
   added to default packages.

4. adds support for "babel" scripts

5. supports `"coffeescript"` as synonym for `"coffee"` as Svelte uses the
   former one - just to be aligned.

6. fixes scope for "Slim" templates
@FichteFoll FichteFoll merged commit a0de1fa into main Nov 18, 2024
@FichteFoll FichteFoll deleted the pr/lang-decider branch November 18, 2024 22:48
@FichteFoll FichteFoll added this to the 5.0.0 milestone Nov 21, 2024
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.

Support JSX and TSX embeds
2 participants