Improve TS/TSX/JS syntax highlighting for parameters, types, and punctuation#43437
Merged
MrSubidubi merged 2 commits intozed-industries:mainfrom Dec 8, 2025
Merged
Improve TS/TSX/JS syntax highlighting for parameters, types, and punctuation#43437MrSubidubi merged 2 commits intozed-industries:mainfrom
MrSubidubi merged 2 commits intozed-industries:mainfrom
Conversation
- Adds @variable.parameter, previously supported by other languages but not js/ts/tsx - Removes queries that would mark any identifier starting with an uppercase letter as @type - Adds additional @type queries - Adds @type.class queries (copying @type.class capture from the python highlights) - Adds '<'/'>' @punctuation.bracket query for type parameters - Adds queries for type punctuation, applying @punctuation.special capture
Highlights param names and typenames
Member
|
Thanks for this! Could you perhaps add a before/after for these changes? |
Contributor
Author
|
@MrSubidubi Yeah for sure! Here's a before/after in 3 different themes
|
MrSubidubi
approved these changes
Dec 8, 2025
Member
MrSubidubi
left a comment
There was a problem hiding this comment.
Thanks for this! I see the slight behavior change/regression in highlighting of class names, but I think these are reasonable and the highlighting before was too broad. So this looks good.
Thank you!
Contributor
|
@claytercek Heads up that we reverted this for now, since we noticed some regressions in the syntax highlighting. We still definitely want to land this with the necessary improvements, but need a bit more time with preview going out tomorrow. |
gaauwe
pushed a commit
that referenced
this pull request
Dec 10, 2025
…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
gaauwe
added a commit
that referenced
this pull request
Dec 11, 2025
…tuation (#44532) Relands #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>
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#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
CherryWorm
pushed a commit
to CherryWorm/zed
that referenced
this pull request
Dec 16, 2025
…and punctuation" (zed-industries#44490) Reverts zed-industries#43437 Internally we noticed some regression related to removed query for PascalCase identifiers. Reverting now to prevent this from going to preview, still planning to land this with the necessary fixes later.
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#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
someone13574
pushed a commit
to someone13574/zed
that referenced
this pull request
Dec 16, 2025
…and punctuation" (zed-industries#44490) Reverts zed-industries#43437 Internally we noticed some regression related to removed query for PascalCase identifiers. Reverting now to prevent this from going to preview, still planning to land this with the necessary fixes later.
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.






This pull request enhances syntax highlighting for JavaScript, TypeScript, TSX, and JSDoc by adding more precise rules for parameters, types, and punctuation.
@variable.parameter)@type,@type.class)@punctuation.special,@punctuation.bracket)@variable.jsdoc)Release Notes: