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

[HTML] Add support for mime type completions #4061

Merged
merged 3 commits into from
Oct 22, 2024

Conversation

deathaxe
Copy link
Collaborator

This PR...

  1. scopes type="..." attributes with unique meta.attribute-with-value.type
  2. adds basic completions for known mime types.

This change is probably of lower importance for basic HTML, but this change may help improving DX for template languages, which support more mime types like TypeScript, LiveScript, Babel, CoffeScript, ... .

This commit...

1. scopes `type="..."` attributes with unique `meta.attribute-with-value.type`
2. adds basic completions for known mime types.

This change is probably of lower importance for basic HTML, but this change
may help improving DX for template languages, which support more mime types
like TypeScript, LiveScript, Babel, CoffeScript, ... .
keith-hall
keith-hall previously approved these changes Oct 21, 2024
Copy link
Collaborator

@michaelblyons michaelblyons left a comment

Choose a reason for hiding this comment

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

Seems a little unnecessary, but you've already done the work.

@deathaxe deathaxe merged commit 8aecabd into sublimehq:master Oct 22, 2024
1 check passed
@deathaxe deathaxe deleted the pr/html/mime-type-completions branch October 22, 2024 05:15
deathaxe added a commit to SublimeText/CoffeeScript that referenced this pull request Oct 31, 2024
This commit...

1. adds `language` to list of supported tag attributes
   used to detect script language.
2. adds dedicated meta scopes for `lang` and `type` attributes
3. adds completions for those values.

Follows sublimehq/Packages#4061
deathaxe added a commit to SublimeText/Astro that referenced this pull request Nov 2, 2024
deathaxe added a commit to SublimeText/Astro that referenced this pull request Nov 2, 2024
This commit scopes `lang` and `language` attributes special to enable
static lang value completions.

Related with sublimehq/Packages#4061
deathaxe added a commit to SublimeText/Astro that referenced this pull request Nov 2, 2024
This commit scopes `type` attributes special to enable static type value
completions and adjusts some tests to maintain compatibility with older
ST builds.

Related with sublimehq/Packages#4061
deathaxe added a commit to deathaxe/Svelte that referenced this pull request Nov 22, 2024
This commit scopes `lang=""` attributes `meta.attribute-with-value.lang`
and `type=""` attributes `meta.attribute-with-value.type`,
to enable support for language/mime-type value completions.

Note: mime-type completions require ST release with following PR merged.

related with sublimehq/Packages#4061
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