Skip to content

Improve TypeScript keyword syntax highlighting#47435

Merged
gaauwe merged 2 commits intozed-industries:mainfrom
ahcurrier:ahcurrier/typescript-language-keyword-highlights
Jan 26, 2026
Merged

Improve TypeScript keyword syntax highlighting#47435
gaauwe merged 2 commits intozed-industries:mainfrom
ahcurrier:ahcurrier/typescript-language-keyword-highlights

Conversation

@ahcurrier
Copy link
Contributor

@ahcurrier ahcurrier commented Jan 22, 2026

Improve syntax highlighting of keywords by creating groups for declarations and import/export.

Release Notes:

  • Highlight declarations with keyword.declaration:

    • const
    • let
    • var
    • function
    • class
    • enum
    • interface
    • type
  • Highlight imports and exports with keyword.import:

    • export
    • from
    • import

@cla-bot
Copy link

cla-bot bot commented Jan 22, 2026

We require contributors to sign our Contributor License Agreement, and we don't have @ahcurrier on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Jan 22, 2026
@maxdeviant maxdeviant changed the title Improve typescript keyword syntax highlighting Improve TypeScript keyword syntax highlighting Jan 22, 2026
@zed-industries-bot
Copy link
Contributor

zed-industries-bot commented Jan 22, 2026

Warnings
⚠️

This PR is missing release notes.

Please add a "Release Notes" section that describes the change:

Release Notes:

- Added/Fixed/Improved ...

If your change is not user-facing, you can use "N/A" for the entry:

Release Notes:

- N/A

Generated by 🚫 dangerJS against 4b335e7

@ahcurrier
Copy link
Contributor Author

@cla-bot check

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Jan 22, 2026
@cla-bot
Copy link

cla-bot bot commented Jan 22, 2026

The cla-bot has been summoned, and re-checked this pull request!

@gaauwe gaauwe merged commit 987b140 into zed-industries:main Jan 26, 2026
27 checks passed
@hisbvdis
Copy link

hisbvdis commented Feb 1, 2026

For some reason "export" word highlighting doesn't work when "JavaScript" language is selected
@ahcurrier

I applied this theme rule

"keyword.import": {
  "color": "#9b61d1",
  "font_style": "italic"
},
Screenshots

1js 2ts

@compeso-mgruenwald
Copy link

compeso-mgruenwald commented Feb 5, 2026

Same goes for TSX. Seems like this only works reliably in plain TypeScript

@ahcurrier @gaauwe should we create a new issue for that?

@gaauwe
Copy link
Contributor

gaauwe commented Feb 5, 2026

Thanks for reporting! I'm indeed able to reproduce this in both TSX and JS, so I'll take a look whats going wrong

@gaauwe
Copy link
Contributor

gaauwe commented Feb 5, 2026

@hisbvdis @compeso-mgruenwald The TSX issue was already fixed and I just merged the fix for JS as well:

@compeso-mgruenwald
Copy link

thanks for the fast reaction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants