JuliaEditorSupport / atom-language-julia

A Julia language support package for the Atom editor
Other
51 stars 39 forks source link

Tokennize function parameters #180

Open GrayJack opened 5 years ago

GrayJack commented 5 years ago

Tokennize function parameters/arguments so we can highlight like this python example:

2019-03-31-004715_grim

CameronBieganek commented 3 years ago

Yes, it would be great if anything inside parentheses and before an equal sign was also tokenized this way, so that it work for both function calls and named tuples. The token name could be something like variable.parameter (which is what python uses) or formal-arg. Here's a screenshot of some Python code:

Screen Shot 2020-11-15 at 11 11 57 AM

I would like to be able to update my color theme to make formal args brown like in the Python version of my color theme.

So to summarize, this would tokenize all arguments in a function declaration as formal-arg and it would also tokenize all keyword argument names in function calls and named tuple "calls". However, to be clear, it would not tokenize variables passed to function calls like x=1; foo(x), since in that case x is a variable rather than a formal argument.

pfitzseb commented 3 years ago

That does seem doable. I wanted to rework our function arg handling anyways, so that seems like a addition.