Skip to content

fix(ruby): adjust constant/keyword highlights - #341

Merged
vitallium merged 1 commit into
zed-extensions:mainfrom
AlternateRT:adjust-constant-keyword-highlights
Sep 24, 2026
Merged

vitallium merged 1 commit into
zed-extensions:mainfrom
AlternateRT:adjust-constant-keyword-highlights

Conversation

@AlternateRT

Copy link
Copy Markdown
Contributor
  • Moves constant highlights to the top level; these were shadowing the previous captures for method names that were parsed as constants
  • Adds highlights for the reserved keywords redo, BEGIN, and END
  • Adjusts the capture for the alias keyword so that it is captured as @keyword.function instead
  • Adjusts the capture for the do keyword so that it is only captured as @keyword.control.repeat when inside a (do) node; when it is inside a (do_block) node, it should be captured as @keyword instead
  • Adds a distinct highlight @keyword.operator capture for keyword operators

- Moves constant highlights to the top level; these were shadowing the
  previous captures for method names that were parsed as constants
- Adds highlights for the reserved keywords `redo`, `BEGIN`, and `END`
- Adjusts the capture for the `alias` keyword so that it is captured as
  `@keyword.function` instead
- Adjusts the capture for the `do` keyword so that it is only captured
  as `@keyword.control.repeat` when inside a `(do)` node; when it is
  inside a `(do_block)` node, it should be captured as `@keyword`
  instead
- Adds a distinct highlight `@keyword.operator` capture for keyword
  operators
@cla-bot cla-bot Bot added the cla-signed label Sep 24, 2026
@vitallium

Copy link
Copy Markdown
Collaborator

Thank you!

@vitallium
vitallium merged commit 58eae07 into zed-extensions:main Sep 24, 2026
7 checks passed
@AlternateRT
AlternateRT deleted the adjust-constant-keyword-highlights branch September 24, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants