Skip to content

Improve TS/TSX/JS syntax highlighting for parameters, types, and punctuation#44532

Merged
gaauwe merged 6 commits intomainfrom
type-identifier-highlighting-ts
Dec 11, 2025
Merged

Improve TS/TSX/JS syntax highlighting for parameters, types, and punctuation#44532
gaauwe merged 6 commits intomainfrom
type-identifier-highlighting-ts

Conversation

@gaauwe
Copy link
Contributor

@gaauwe gaauwe commented Dec 10, 2025

Relands #43437

Release Notes:

  • Refined syntax highlighting in JavaScript and TypeScript for better visual distinction of
    types, parameters, and JSDoc elements

gaauwe and others added 5 commits December 9, 2025 17:11
Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: MrSubidubi <dev@bahn.sh>
…tuation (#43437)

This pull request enhances syntax highlighting for JavaScript,
TypeScript, TSX, and JSDoc by adding more precise rules for parameters,
types, and punctuation.

- Added queries for highlighting parameters (`@variable.parameter`)
- Expanded highlighting for type identifiers, type aliases, interfaces,
classes
- Extended/implemented types to improve distinction between different
type constructs (`@type`, `@type.class`)
- Added highlighting for punctuation in type parameters, unions,
intersections, annotations, index signatures, optional fields, and
predicates (`@punctuation.special`, `@punctuation.bracket`)
- Added highlighting for identifiers in JSDoc comments
(`@variable.jsdoc`)

Release Notes:

- Refined syntax highlighting in JavaScript and TypeScript for better
visual distinction of
  types, parameters, and JSDoc elements
@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Dec 10, 2025
@gaauwe gaauwe merged commit 8572c19 into main Dec 11, 2025
23 checks passed
@gaauwe gaauwe deleted the type-identifier-highlighting-ts branch December 11, 2025 11:02
nrbnlulu pushed a commit to nrbnlulu/zed that referenced this pull request Dec 14, 2025
…tuation (zed-industries#44532)

Relands zed-industries#43437

Release Notes:

- Refined syntax highlighting in JavaScript and TypeScript for better
visual distinction of types, parameters, and JSDoc elements

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Clay Tercek <30105080+claytercek@users.noreply.github.com>
CherryWorm pushed a commit to CherryWorm/zed that referenced this pull request Dec 16, 2025
…tuation (zed-industries#44532)

Relands zed-industries#43437

Release Notes:

- Refined syntax highlighting in JavaScript and TypeScript for better
visual distinction of types, parameters, and JSDoc elements

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Clay Tercek <30105080+claytercek@users.noreply.github.com>
someone13574 pushed a commit to someone13574/zed that referenced this pull request Dec 16, 2025
…tuation (zed-industries#44532)

Relands zed-industries#43437

Release Notes:

- Refined syntax highlighting in JavaScript and TypeScript for better
visual distinction of types, parameters, and JSDoc elements

---------

Co-authored-by: MrSubidubi <dev@bahn.sh>
Co-authored-by: Clay Tercek <30105080+claytercek@users.noreply.github.com>
gaauwe added a commit that referenced this pull request Jan 5, 2026
Closes #45251

In #44532 the syntax
highlighting of JS/TS was improved, but we only used `type.builtin` for
a specific case. This resulted in less consistent syntax highlighting.
Not all themes have this specific token and we don't use `type.builtin`
in other places either, so while this is a little less specific it is
more consistent.

Release Notes:

- Improved syntax highlighting consistency for builtins in JavaScript
and TypeScript
rtfeldman pushed a commit that referenced this pull request Jan 5, 2026
Closes #45251

In #44532 the syntax
highlighting of JS/TS was improved, but we only used `type.builtin` for
a specific case. This resulted in less consistent syntax highlighting.
Not all themes have this specific token and we don't use `type.builtin`
in other places either, so while this is a little less specific it is
more consistent.

Release Notes:

- Improved syntax highlighting consistency for builtins in JavaScript
and TypeScript
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…ustries#46068)

Closes zed-industries#45251

In zed-industries#44532 the syntax
highlighting of JS/TS was improved, but we only used `type.builtin` for
a specific case. This resulted in less consistent syntax highlighting.
Not all themes have this specific token and we don't use `type.builtin`
in other places either, so while this is a little less specific it is
more consistent.

Release Notes:

- Improved syntax highlighting consistency for builtins in JavaScript
and TypeScript
LivioGama pushed a commit to LivioGama/zed that referenced this pull request Jan 20, 2026
…ustries#46068)

Closes zed-industries#45251

In zed-industries#44532 the syntax
highlighting of JS/TS was improved, but we only used `type.builtin` for
a specific case. This resulted in less consistent syntax highlighting.
Not all themes have this specific token and we don't use `type.builtin`
in other places either, so while this is a little less specific it is
more consistent.

Release Notes:

- Improved syntax highlighting consistency for builtins in JavaScript
and TypeScript
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants