Skip to content

fix(ruby): adjust specifity of word characters - #336

Open
AlternateRT wants to merge 1 commit into
zed-extensions:mainfrom
AlternateRT:adjust-word-characters
Open

AlternateRT wants to merge 1 commit into
zed-extensions:mainfrom
AlternateRT:adjust-word-characters

Conversation

@AlternateRT

Copy link
Copy Markdown
Contributor

Only treat ! and ? as word characters when used in identifiers, symbols, hash key symbols, or the defined? method

Only treat `!` and `?` as word characters when used in identifiers,
symbols, hash key symbols, or the `defined?` method
@cla-bot cla-bot Bot added the cla-signed label Sep 19, 2026

@vitallium vitallium left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I left just one suggestion about extending the capture to support more scenarios. Happy to hear your thoughts.

Side note: I think we have an issue with our CI configuration, as I’m pretty sure the changes in this PR should cause our snapshot tests to fail.

Comment on lines +6 to +11
[
(identifier)
(simple_symbol)
(hash_key_symbol)
"defined?"
] @identifier

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: should we also add delimited_symbol and bare_symbol to handle use cases like :"ready?" or symbol arrays?

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