Skip to content

Conversation

@vitallium
Copy link
Collaborator

@vitallium vitallium commented Apr 15, 2025

Previous version captures constant assignments to constants:

Left = Right

In the snippet above, we capture both constants Left and Right but we need Left only. This commit improves the TS query to capture only the left side of the assignment.

Before After
CleanShot 2025-04-15 at 21 32 00@2x CleanShot 2025-04-15 at 21 32 21@2x

Previous version captures constant assignments to constants:

```ruby
Left = Right
```

In the snippet above, we capture both constants `Left` and `Right`
but we need `Left` only. This commit improves the TS query
to capture only the left side of the assignment.
@cla-bot cla-bot bot added the cla-signed label Apr 15, 2025
@vitallium
Copy link
Collaborator Author

@andyw8 what do you think about this version?

Copy link
Contributor

@andyw8 andyw8 left a comment

Choose a reason for hiding this comment

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

Yes, this makes more sense.

@vitallium
Copy link
Collaborator Author

Yes, this makes more sense.

Thanks for confirming!

@vitallium vitallium merged commit d3b4ff6 into main Apr 15, 2025
1 check passed
@vitallium vitallium deleted the vs/improve-constants-outline branch April 15, 2025 20:14
@joeldrapper
Copy link
Contributor

As an example of how useful this update is, I’m working on a file that defines about a hundred constants.

Screenshot 2025-04-22 at 18 12 01

notpeter pushed a commit to zed-industries/extensions that referenced this pull request Apr 30, 2025
Hi, this pull request updates the Ruby extension to v0.5.6, which
includes many goodies and fixes. You can find the full list of changes
on the release page
[here](https://github.com/zed-extensions/ruby/releases/tag/v0.5.6). I'm
also copying it below for your convenience:

## What's Changed

```
1. Remove default tasks.json by @vitallium in zed-extensions/ruby#36
2. Remove else from outdent triggers by @vitallium in zed-extensions/ruby#42
3. Add completion_query_characters by @smitbarmase in zed-extensions/ruby#49
4. Add minimal README by @andyw8 in zed-extensions/ruby#54
5. Specify ? and ! as word characters by @andyw8 in zed-extensions/ruby#58
6. Add some basic tasks by @andyw8 in zed-extensions/ruby#57
7. Add constants to outline view by @vitallium in zed-extensions/ruby#60
8. Capture constants with assignments only for outline panel by @vitallium in zed-extensions/ruby#61
9. Include singleton class in outline by @joeldrapper in zed-extensions/ruby#67
10. Fix missing Tailwind completions by @I-Info in zed-extensions/ruby#62
11. Fix visibility keywords in outline by @joeldrapper in zed-extensions/ruby#65
12. Include method modifiers in outline by @joeldrapper in zed-extensions/ruby#66
13. Improve Ruby outlines with support for macros by @joeldrapper in zed-extensions/ruby#70
14. Mark instance & class variables as "@variable.special" by @asok in zed-extensions/ruby#63
15. Add task to evaluate selected text as Ruby by @andyw8 in zed-extensions/ruby#73
```

Thanks!
lucascompython pushed a commit to lucascompython/extensions that referenced this pull request Oct 3, 2025
Hi, this pull request updates the Ruby extension to v0.5.6, which
includes many goodies and fixes. You can find the full list of changes
on the release page
[here](https://github.com/zed-extensions/ruby/releases/tag/v0.5.6). I'm
also copying it below for your convenience:

## What's Changed

```
1. Remove default tasks.json by @vitallium in zed-extensions/ruby#36
2. Remove else from outdent triggers by @vitallium in zed-extensions/ruby#42
3. Add completion_query_characters by @smitbarmase in zed-extensions/ruby#49
4. Add minimal README by @andyw8 in zed-extensions/ruby#54
5. Specify ? and ! as word characters by @andyw8 in zed-extensions/ruby#58
6. Add some basic tasks by @andyw8 in zed-extensions/ruby#57
7. Add constants to outline view by @vitallium in zed-extensions/ruby#60
8. Capture constants with assignments only for outline panel by @vitallium in zed-extensions/ruby#61
9. Include singleton class in outline by @joeldrapper in zed-extensions/ruby#67
10. Fix missing Tailwind completions by @I-Info in zed-extensions/ruby#62
11. Fix visibility keywords in outline by @joeldrapper in zed-extensions/ruby#65
12. Include method modifiers in outline by @joeldrapper in zed-extensions/ruby#66
13. Improve Ruby outlines with support for macros by @joeldrapper in zed-extensions/ruby#70
14. Mark instance & class variables as "@variable.special" by @asok in zed-extensions/ruby#63
15. Add task to evaluate selected text as Ruby by @andyw8 in zed-extensions/ruby#73
```

Thanks!
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.

4 participants