I'm writing a grammar file for the Atom Editor for a specific (yet unsupported language).
While I'm getting expected results up to now, I'm not sure how to accomplish the following.
I want functions declared in the current file that are called in the same file to be highlighted. For now, the function calls don't get matched/highlighted.
I know it is possible as C files are properly highlighted. For example, in the following screenshot, the call to function my_function()
gets highlighted in blue:
Right now, function definitions are matched with the following cson snippet:
{
'comment': 'Functions'
'match': '^\\s*(function)\\s*(\\w*)'
'captures':
'1':
'name': 'variable.other.newlang'
'2':
'name': 'support.function.any-method.newlang'
}
which is quite basic but work fine. But unfortunately the function calls will not be highlighted the same way as in C.
How can I achieve this?
Note that Atom uses the (almost) same grammar file syntax as Sublime Text 3 and TextMate.
Thanks!