Python: add scope entity.name.function.python for the actual function name in a function call

lanzz 11 years ago updated 11 years ago 1

In the Python/Python.tmLanguage file, find this pattern:

and add a scope name for this pattern:

This would allow to highlight all function names inside a nested function call:

Without the above change, you cannot match both "foo" and "bar" function names; you can either match "meta.function-call" which would match "foo" but would also include all the parameters (thus also "baz", which is not a function name), or you can match "meta.function-call - meta.function-call.parameters" which would match "foo" but exclude the "bar" function name.

Hm, on second thought, "entity.name.function.python" is not a good choice, as it populates the "goto symbol" panel. "meta.function-call.function-name" perhaps?