Reputation: 6761
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
end
end
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:
It is a method that is defined in the same class:
Interestingly, in my example code, the highlighting is exactly as I want it:
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.
Upvotes: 2
Views: 602
Reputation: 121000
Atom
is an Electron app, based on Chrome. Feel free to press Ctrl+Shift+I and examine whatever you want with Chrome Developer Tools:
As you can see, the local method call is not granted with any class, therefore it is impossible to style it without patching the syntax highlighter. For those elements having the class[es], one might simply Edit
⇒ Stylesheet
in the main menu and update the CSS.
Upvotes: 3