Variant9
4f4bbf264f
theme_importer: Handle comma-separated token scopes ( #27740 )
...
This PR allows the `theme-importer` utility to handle comma-separated
token scopes.
Normally, a token in a VS Code theme is defined as either a string or a
string array:
```json
{
"scope": "token.debug-token",
"settings": {
"foreground": "#d55fde"
}
},
{
"name": "String interpolation",
"scope": [
"punctuation.definition.template-expression.begin",
"punctuation.definition.template-expression.end",
"punctuation.section.embedded"
],
"settings": {
"foreground": "#d55fde"
}
},
```
However, [some
themes](https://github.com/tal7aouy/theme/blob/ac85540d6494cf3b7dffd6adc8a06af6c1dd4b0d/src/variants/TokenColors.ts#L1771-L1777 )
seem to use comma-separated values in a single scope string which VS
Code seems to accept as well:
```json
{
"name": "Comments",
"scope": "comment, punctuation.definition.comment",
"settings": {
"foreground": "#7f848e"
}
},
```
This PR handles these definitions by splitting scopes by commas before
trying to match them with the scopes that match Zed syntax tokens.
Release Notes:
- N/A
2025-04-23 14:06:58 +00:00
..
2025-04-07 18:10:01 +00:00
2025-04-23 11:37:55 +00:00
2025-04-19 23:26:29 +00:00
2025-04-16 19:46:36 -04:00
2025-04-02 13:26:34 -07:00
2025-04-21 20:16:51 +00:00
2025-04-22 09:01:01 +00:00
2025-04-11 00:01:33 +00:00
2025-04-02 13:26:34 -07:00
2025-04-21 20:16:51 +00:00
2025-04-23 09:42:43 +00:00
2025-04-23 09:42:43 +00:00
2025-04-02 13:26:34 -07:00
2025-04-14 10:36:31 -07:00
2025-04-15 09:35:13 -06:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-19 23:26:29 +00:00
2025-04-07 20:26:55 +00:00
2025-04-10 22:58:41 +00:00
2025-04-08 16:01:27 +00:00
2025-04-02 13:26:34 -07:00
2025-04-11 17:38:14 +00:00
2025-04-21 21:30:21 -07:00
2025-04-02 13:26:34 -07:00
2025-04-22 22:04:21 -06:00
2025-04-20 00:53:30 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-17 17:29:19 +00:00
2025-04-21 11:28:49 -03:00
2025-04-15 14:28:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-19 23:26:29 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 19:35:47 -04:00
2025-04-21 16:00:03 +00:00
2025-04-15 14:59:42 +00:00
2025-04-22 19:35:47 -04:00
2025-04-22 19:35:47 -04:00
2025-04-19 23:26:29 +00:00
2025-04-22 05:25:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 22:04:21 -06:00
2025-04-23 13:19:01 +00:00
2025-04-11 22:01:25 +00:00
2025-04-22 21:07:52 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 21:07:52 +00:00
2025-04-02 13:26:34 -07:00
2025-04-16 19:25:00 +02:00
2025-04-15 21:36:30 -04:00
2025-04-11 23:02:50 +00:00
2025-04-02 13:26:34 -07:00
2025-04-23 11:37:55 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-23 11:37:55 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 05:25:09 +00:00
2025-04-17 22:14:44 -06:00
2025-04-22 09:37:12 +00:00
2025-04-22 22:08:28 +00:00
2025-04-20 00:53:30 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-22 09:01:01 +00:00
2025-04-02 13:26:34 -07:00
2025-04-10 21:16:43 +00:00
2025-04-18 14:15:19 +00:00
2025-04-22 21:16:54 +00:00
2025-04-11 01:47:40 +05:30
2025-04-02 13:26:34 -07:00
2025-04-23 01:20:25 +05:30
2025-04-02 13:26:34 -07:00
2025-04-22 09:37:12 +00:00
2025-04-21 01:12:57 +00:00
2025-04-22 09:05:46 +00:00
2025-04-02 13:26:34 -07:00
2025-04-19 22:23:03 +08:00
2025-04-21 21:30:21 -07:00
2025-04-02 13:26:34 -07:00
2025-04-08 16:01:27 +00:00
2025-04-02 13:26:34 -07:00
2025-04-07 10:35:11 -06:00
2025-04-21 22:28:32 +00:00
2025-04-21 19:29:21 -04:00
2025-04-07 18:46:09 +00:00
2025-04-02 13:26:34 -07:00
2025-04-21 17:03:42 +00:00
2025-04-19 23:29:36 +00:00
2025-04-22 05:25:09 +00:00
2025-04-10 21:16:43 +00:00
2025-04-08 16:09:06 -06:00
2025-04-02 13:26:34 -07:00
2025-04-19 23:26:29 +00:00
2025-04-10 23:22:27 +00:00
2025-04-17 01:44:00 +05:30
2025-04-02 13:26:34 -07:00
2025-04-22 14:24:09 +00:00
2025-04-11 23:02:50 +00:00
2025-04-02 13:26:34 -07:00
2025-04-23 11:37:55 +00:00
2025-04-22 01:44:31 +00:00
2025-04-02 13:26:34 -07:00
2025-04-21 20:16:51 +00:00
2025-04-21 20:16:51 +00:00
2025-04-21 16:00:03 +00:00
2025-04-21 16:00:03 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 21:32:32 +00:00
2025-04-02 13:26:34 -07:00
2025-04-22 21:32:32 +00:00
2025-04-08 09:17:08 -06:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-03 23:32:50 +02:00
2025-04-16 20:22:44 +00:00
2025-04-02 13:26:34 -07:00
2025-04-20 00:53:30 +00:00
2025-04-18 20:41:02 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-19 22:23:03 +08:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-18 12:11:54 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-08 16:09:06 -06:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-08 15:57:36 -06:00
2025-04-22 14:24:09 +00:00
2025-04-21 16:00:03 +00:00
2025-04-02 13:26:34 -07:00
2025-04-21 21:30:21 -07:00
2025-04-21 16:00:03 +00:00
2025-04-23 13:13:28 +00:00
2025-04-09 01:53:54 +00:00
2025-04-09 10:49:39 -04:00
2025-04-02 13:26:34 -07:00
2025-04-23 14:06:58 +00:00
2025-04-02 13:26:34 -07:00
2025-04-02 13:26:34 -07:00
2025-04-18 04:23:56 +05:30
2025-04-16 19:05:57 +02:00
2025-04-21 10:56:42 -03:00
2025-04-08 16:09:06 -06:00
2025-04-08 16:09:06 -06:00
2025-04-07 19:03:24 +00:00
2025-04-18 15:04:26 -06:00
2025-04-02 13:26:34 -07:00
2025-04-22 22:28:13 -06:00
2025-04-02 13:26:34 -07:00
2025-04-16 19:25:00 +02:00
2025-04-16 19:25:00 +02:00
2025-04-11 01:47:40 +05:30
2025-04-22 19:35:47 -04:00
2025-04-19 02:47:59 +00:00
2025-04-22 19:35:47 -04:00
2025-04-21 20:16:51 +00:00
2025-04-21 21:30:21 -07:00
2025-04-22 18:54:56 -04:00
2025-04-14 14:17:07 +00:00