Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight query improvements for java and typescript #7145

Merged

Conversation

yusuphgammut
Copy link
Contributor

Java

Java highlights were completely missing punctuation and operator highlights. This PR adds them based on the JSE 20 language spec. Changes include:

  • Add punctuation according to the spec (see "3.11. Separators"). I defined @ and ... as special punctuation because those are somewhat different to the regular punctuation symbols.
  • Add operators according to the spec (see "3.12. Operators").
  • Highlight the wildcard type argument ? as a type instead of as an operator, in the context of type arguments, according to the spec (see "4.5.1. Type Arguments of Parameterized Types").

Typescript

The symbols < and > where being highlighted as operators in the context of type arguments, and the highlight for type parameters was missing. Changes include:

  • Move the ; inherits: ecma statement to the bottom of the file so that the operator highlights in there don't override the highlight of < and > for type arguments and parameters (and any type highlight really).
  • Add highlight for < and > in the context of type parameters.

@pascalkuthe pascalkuthe merged commit 86ef389 into helix-editor:master May 26, 2023
aotarola pushed a commit to aotarola/helix that referenced this pull request May 28, 2023
* Add missing queries to java highlights

* Fix generic type bracket highlights in typescript
aotarola pushed a commit to aotarola/helix that referenced this pull request May 28, 2023
* Add missing queries to java highlights

* Fix generic type bracket highlights in typescript
Triton171 pushed a commit to Triton171/helix that referenced this pull request Jun 18, 2023
* Add missing queries to java highlights

* Fix generic type bracket highlights in typescript
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
* Add missing queries to java highlights

* Fix generic type bracket highlights in typescript
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
* Add missing queries to java highlights

* Fix generic type bracket highlights in typescript
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
* Add missing queries to java highlights

* Fix generic type bracket highlights in typescript
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants