Ruby/Erb Ruby conditional statements bracket highlighter


#1

Hello all,

I am a rails/ruby developer. I like so much atom.io but i could not find do/end if/elsif/end like block highlighter in atom.io.
Before i use sublime text 2 and it has a BracketHighlighter plugin for highlite the brackets in erb.

https://github.com/facelessuser/BracketHighlighter In sublime text configuration i found the following settings

// Ruby embedded HTML
{
 "name": "ruby_embedded_html",
 "open": "((?:(?<=<%)|(?<=^)|(?<==))\\s*\\b(?:if|begin)\\b|(?:(?<=<%)|(?<=^))\\s*\\b(?:case|for|until|unless|while|class|module|def\\b[\\p{Ll}\\p{Lu}]*)|\\bdo)\\b",
"close": "\\b(end)\\b",
"style": "default",
"scope_exclude": ["text.html", "source", "comment", "string"],
"scope_exclude_exceptions": ["source.ruby.rails.embedded.html", "source.ruby.embedded.html"],
"plugin_library": "bh_modules.rubykeywords",
"language_filter": "whitelist",
"language_list": ["HTML", "HTML 5", "PHP", "HTML (Rails)"],
"enabled": true
},

// Ruby conditional statements
{
"name": "ruby",
"open": "((?:(?<=^)|(?<==))\\s*\\b(?:if|begin)\\b|^\\s*\\b(?:case|for|until|unless|while|class|module|def\\b[\\p{Ll}\\p{Lu}]*)|\\bdo)\\b",
"close": "\\b(end)\\b",
"style": "default",
"scope_exclude": ["string", "comment"],
"plugin_library": "bh_modules.rubykeywords",
"language_filter": "whitelist",
"language_list": ["Ruby", "RSpec", "Ruby on Rails"],
"enabled": true
},

Is there any way to implement this in atom?

Regards,
ustuntas


#2

There is an open Issue for highlighting the Ruby blocks in the bracket-matcher package:


#3

Ok then. we will wait for… :slight_smile:


#4

Hi. I just found this year-old thread, and I see this still hasn’t been implemented in the bracket-matcher package. Is there any other Atom package that highlights Ruby methods?