Skip to content

Conversation

@vitallium
Copy link
Collaborator

@vitallium vitallium commented Mar 4, 2025

Closes #39

Remove else from outdent triggers to indent the else keyword properly.

The else outdent is used for use cases with begin..rescue..else..end. Consider the following code block:

def test
  begin
    a
  rescue
    puts "Something went wrong!"
else
|#<= cursor position
end
before.mp4

Currently the else keyword is indented incorrectly but removing the else keyword from the indents triggers turns the same block into this:

def test
  begin
    a
  rescue
    puts "Something went wrong!"
  else
  |#<= cursor position
end
after.mp4

@cla-bot cla-bot bot added the cla-signed label Mar 4, 2025
@vitallium vitallium merged commit 35ef4d4 into main Mar 7, 2025
1 check passed
@vitallium vitallium deleted the vs/remove-else-outdent-from-indents branch March 7, 2025 10:08
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.

Wrong indentation level for else keyword

2 participants