zed/script
Nate Butler 189cece03e
Add analyze highlights script (#10855)
Adds a script to print all unique highlight keys for building syntax
themes.

Usage:

- `python script/analyze_highlights.py` OR
- `python script/analyze_highlights.py -v`
- Using the `-v` or `--verbose` arg will print each language that uses
each key.

Example output:

```
@attribute (6)
@boolean (5)
@charset (1)
@comment (19)
@comment.doc (3)
@comment.unused (2)
@constant (27)
@constant.builtin (15)
@constant.character (1)
@constructor (4)
@embedded (10)
@emphasis (1)
@emphasis.strong (1)
@escape (4)
@function (44)
@function.builtin (2)
@function.definition (2)
@function.method (22)
@function.method.builtin (3)
@function.special (4)
@function.special.definition (1)
@import (1)
@keyframes (1)
@keyword (32)
@label (2)
@link_text (1)
@link_uri (1)
@media (1)
@module (1)
@namespace (1)
@number (16)
@operator (24)
@property (11)
@property.json_key (1)
@punctuation (1)
@punctuation.bracket (28)
@punctuation.delimiter (12)
@punctuation.list_marker (1)
@punctuation.special (17)
@string (23)
@string.doc (1)
@string.escape (5)
@string.regex (7)
@string.special (4)
@string.special.symbol (2)
@supports (1)
@tag (14)
@text.literal (2)
@title (1)
@type (28)
@type.builtin (4)
@type.super (3)
@variable (5)
@variable.member (3)
@variable.parameter (4)
@variable.special (12)

Extension-only:

@tag.delimiter (1)
```

Verbose example output:

```
Shared:

@attribute (6) - [css, heex, javascript, tsx]
@boolean (5) - [javascript, proto, tsx, typescript, yaml]
@charset (1) - [css]
@comment (19) - [bash, c, cpp, css, elixir, erb, go, gomod, gowork, heex, javascript, json, proto, python, ruby, rust, tsx, typescript, yaml]
@comment.doc (3) - [elixir]
@comment.unused (2) - [elixir]
@constant (27) - [bash, c, cpp, elixir, heex, javascript, json, proto, python, ruby, rust, tsx, typescript]
@constant.builtin (15) - [elixir, go, javascript, python, ruby, tsx, typescript, yaml]
@constant.character (1) - [regex]
@constructor (4) - [tsx, typescript]
@embedded (10) - [bash, elixir, javascript, python, ruby, tsx, typescript]
@emphasis (1) - [markdown]
@emphasis.strong (1) - [markdown]
@escape (4) - [go, python, regex, ruby]
@function (44) - [bash, c, cpp, css, elixir, go, heex, javascript, python, rust, tsx, typescript]
@function.builtin (2) - [python]
@function.definition (2) - [rust]
@function.method (22) - [go, javascript, python, ruby, rust, tsx, typescript]
@function.method.builtin (3) - [ruby]
@function.special (4) - [c, cpp, rust]
@function.special.definition (1) - [rust]
@import (1) - [css]
@keyframes (1) - [css]
@keyword (32) - [bash, c, cpp, css, elixir, erb, go, gomod, gowork, heex, javascript, jsdoc, proto, python, ruby, rust, tsx, typescript]
@label (2) - [c, cpp]
@link_text (1) - [markdown]
@link_uri (1) - [markdown]
@media (1) - [css]
@module (1) - [heex]
@namespace (1) - [css]
@number (16) - [bash, c, cpp, css, elixir, go, javascript, json, proto, python, regex, ruby, rust, tsx, typescript, yaml]
@operator (24) - [bash, c, cpp, css, elixir, go, gomod, gowork, heex, javascript, proto, python, regex, ruby, tsx, typescript]
@property (11) - [bash, c, cpp, css, javascript, python, regex, rust, tsx, typescript, yaml]
@property.json_key (1) - [json]
@punctuation (1) - [elixir]
@punctuation.bracket (28) - [c, cpp, elixir, go, heex, javascript, json, proto, regex, ruby, rust, tsx, typescript, yaml]
@punctuation.delimiter (12) - [c, cpp, css, elixir, heex, javascript, proto, regex, ruby, tsx, typescript, yaml]
@punctuation.list_marker (1) - [markdown]
@punctuation.special (17) - [elixir, javascript, python, ruby, tsx, typescript, yaml]
@string (23) - [bash, c, cpp, css, elixir, go, gomod, gowork, heex, javascript, json, proto, python, regex, ruby, rust, tsx, typescript, yaml]
@string.doc (1) - [python]
@string.escape (5) - [elixir, javascript, tsx, typescript, yaml]
@string.regex (7) - [elixir, javascript, ruby, tsx, typescript]
@string.special (4) - [css, elixir]
@string.special.symbol (2) - [elixir, ruby]
@supports (1) - [css]
@tag (14) - [css, heex, javascript, tsx]
@text.literal (2) - [markdown]
@title (1) - [markdown]
@type (28) - [c, cpp, css, elixir, go, javascript, jsdoc, proto, python, ruby, rust, tsx, typescript, yaml]
@type.builtin (4) - [javascript, rust, tsx, typescript]
@type.super (3) - [ruby]
@variable (5) - [c, cpp, javascript, tsx, typescript]
@variable.member (3) - [go, ruby]
@variable.parameter (4) - [ruby]
@variable.special (12) - [cpp, css, javascript, ruby, rust, tsx, typescript]

Extension-only:

@tag.delimiter (1) - [astro]
```

Release Notes:

- N/A

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
2024-04-22 11:51:06 -04:00
..
danger Setup Danger (#6994) 2024-01-29 11:58:24 -05:00
eula remoting (#9680) 2024-03-22 08:44:56 -06:00
lib Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
licenses Extract Terraform extension (#10479) 2024-04-12 11:49:49 -04:00
update_top_ranking_issues Use set literal notation 2024-04-11 00:43:56 -04:00
analyze_highlights.py Add analyze highlights script (#10855) 2024-04-22 11:51:06 -04:00
bootstrap Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
bump-extension-cli Add a script for bumping the extension CLI (#9646) 2024-03-21 12:05:31 -04:00
bump-nightly ./script/trigger-release (#10589) 2024-04-16 19:32:51 -06:00
bump-zed-minor-versions Remove 0-patch requirement on main in bump-zed-minor-versions 2024-02-14 13:13:44 -05:00
bump-zed-patch-version Create new Zed release channel: nightly 2023-11-17 12:13:32 +02:00
bundle-linux Adjust to newer logic from zed-industries/cargo-bundle (#9058) 2024-03-08 13:37:10 +02:00
bundle-mac Don't make -l imply -d in bundle-mac script (#10438) 2024-04-15 14:29:45 -06:00
clear-target-dir-if-larger-than Don't error when checking target dir size if there is no target dir 2024-01-23 17:17:47 -08:00
clippy Add cargo xtask clippy (#8722) 2024-03-02 14:46:02 -05:00
collab-flamegraph Only 5s of data! (#8983) 2024-03-06 21:35:46 -07:00
crate-dep-graph Remove 2 suffix for collab, rope, settings, menu 2024-01-03 12:29:16 -08:00
create-migration remoting (#9680) 2024-03-22 08:44:56 -06:00
deploy-collab just kidding (#7241) 2024-02-01 11:57:09 -07:00
deploy-postgrest No more nightly/preview collab anymore (#7112) 2024-01-30 20:11:06 -07:00
draft-release-notes Have the CI server draft the release notes (#10700) 2024-04-17 15:51:45 -06:00
drop-test-dbs Consolidate logic for completion alongside code actions in Project 2022-02-08 14:24:45 -08:00
gemini.py Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
generate-eula-rtf Update EULA 2023-04-05 08:18:51 -06:00
generate-licenses Add a command to expand the context for a multibuffer (#10300) 2024-04-19 14:27:56 -07:00
get-changes-since Format scripts with Prettier (#8393) 2024-02-25 11:03:33 -05:00
get-crate-version Create preview channel 2022-10-26 16:19:19 -07:00
get-preview-channel-changes get-preview-channel-changes errors on invalid token (#9616) 2024-03-20 21:44:12 -06:00
get-released-version ./script/trigger-release (#10589) 2024-04-16 19:32:51 -06:00
histogram Print error message and skip line 2024-01-23 16:52:08 +01:00
import-themes Style wrap guides for imported themes 2023-12-18 11:16:22 -05:00
kube-shell Add kube-shell script, for running shell commands in a deployed container 2021-09-29 14:55:16 -07:00
linux Fix dependency install script on RHEL derivatives (#9684) 2024-03-25 11:14:11 -07:00
metal-debug Add script to debug Metal frames 2022-01-27 08:51:55 +01:00
randomized-test-ci Remove ZED_CLIENT_SECRET_TOKEN 2024-01-23 10:34:43 -07:00
randomized-test-minimize Format scripts with Prettier (#8393) 2024-02-25 11:03:33 -05:00
reset_db Add reset_db script 2023-09-25 21:45:28 -04:00
run-local-minio Fix tracing subscriber after introducing Tokio-console (#8907) 2024-03-05 14:11:33 -08:00
seed-db Make it (a tiny bit) easier to run your own collab (#9557) 2024-03-20 21:00:02 -06:00
sqlx Allow AI interactions to be proxied through Zed's server so you don't need an API key (#7367) 2024-03-19 19:22:26 +01:00
squawk Suppress typos in basic.conf (#10099) 2024-04-02 21:02:25 -04:00
storybook Remove 2 suffix for ui, storybook, text 2024-01-03 12:33:51 -08:00
symbolicate Fix ./script/symbolicate on Preview crashes (#8956) 2024-03-06 10:26:50 -07:00
trigger-release ./script/trigger-release (#10589) 2024-04-16 19:32:51 -06:00
upload-extension-cli Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
upload-nightly Add GitHub Action for publishing the extension CLI (#9542) 2024-03-19 14:19:32 -04:00
what-is-deployed Deploy collab like nightly (#7174) 2024-02-01 11:54:49 -07:00
zed-local zed-local: add --stable flag to zed-local (#10165) 2024-04-04 15:26:41 +02:00