Quantcast
Channel: How to add syntax highlighting for custom methods in Atom for Ruby - Stack Overflow
Viewing all articles
Browse latest Browse all 2

How to add syntax highlighting for custom methods in Atom for Ruby

$
0
0

For example, in the following class, I want syntax highlighting for helper_method(@x, @y) (line 1 in the main method.)

class test  def new(x, y)    @x = x    @y = y  end  def main    result = helper_method(@x, @y)    puts result  end  def helper_method(x, y)    // do stuff with x, y  endend

I wonder why the current highlighting scheme doesn't do that as it seems valuable to me to see where I call my methods and where I just use baked-in commands and expressions. Can I change that, for Atom?

Here some screenshots to further illustrate my problem:

In the first screenshot I expect get_time_limit_for_source(order_source) to be highlighted:

enter image description here

It is a method that is defined in the same class:

enter image description here

Interestingly, in my example code, the highlighting is exactly as I want it:

enter image description here

The highlighting in the test class is as I want it, but in this case is due to the use of the helper word which triggers highlighting when language-ruby-on-rails is installed/activated.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>