Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 32 additions & 6 deletions languages/ruby/brackets.scm
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,48 @@
("{" @open
"}" @close)

("\"" @open
("do" @open
"end" @close)

(string
"\"" @open
"\"" @close
(#set! rainbow.exclude))

("do" @open
"end" @close)
(string_array
"%w(" @open
")" @close
(#set! rainbow.exclude))

(block_parameters
"|" @open
"|" @close)
(delimited_symbol
":\"" @open
"\"" @close
(#set! rainbow.exclude))

(symbol_array
"%i(" @open
")" @close
(#set! rainbow.exclude))

(regex
"/" @open
"/" @close
(#set! rainbow.exclude))

(subshell
"`" @open
"`" @close
(#set! rainbow.exclude))

(interpolation
"#{" @open
"}" @close
(#set! rainbow.exclude))

(block_parameters
"|" @open
"|" @close)

(if
"if" @open
"end" @close)
Expand Down
6 changes: 6 additions & 0 deletions languages/ruby/indents.scm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@
(do
"end" @end) @indent

(string_array
")" @end) @indent

(symbol_array
")" @end) @indent

Comment on lines +31 to +36

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.

question: is this change related here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes it's related. I thought it would be ok to include this here since the PR already proposes to adds bracket detection for them.

[
(else)
(elsif)
Expand Down
Loading