sublimehq / Packages

Syntax highlighting files shipped with Sublime Text and Sublime Merge
https://sublimetext.com
Other
2.95k stars 587 forks source link

[JavaScript] fix tagged template string key bindings regression #4022

Closed deathaxe closed 1 month ago

deathaxe commented 2 months ago

This PR...

  1. scopes tagged template strings meta.string.template to give all of them a common scope without regards of used syntax highlighting
  2. uses that scope in key bindings' selectors to enable them in syntax highlighted tagged templates.
  3. restrict ` to JavaScript strings by enforcing scope order in selectors in binding 1 and 2
  4. merge "selector" keys in binding 3 and 4

It fixes no longer working key bindings in syntax highlighted tagged templates, regressed by #4019.

deathaxe commented 2 months ago

It's currently a bit unclear to me, whether auto-pairing backquotes not being enabled in JSX/TSX is by intent or whether we want to use the opportunity to add it.

FichteFoll commented 1 month ago

It's currently a bit unclear to me, whether auto-pairing backquotes not being enabled in JSX/TSX is by intent or whether we want to use the opportunity to add it.

I suspect this was an oversight as I see no reason to treat them differently, personally.