MagicPython
MagicPython copied to clipboard
function invocation not colored consistently
bar = 1
def foo():
pass
foo()
bar += 1
Most theme's don't colorize meta.function-call
as the idea is that it should cover function names, including the full path, and all parameters (see https://www.sublimetext.com/docs/3/scope_naming.html)
I good scope to give function names is support.function
Is this going to be fixed any time soon? also, what about method calls? can we get these colroed as well?
Is this going to be fixed any time soon? also, what about method calls? can we get these colroed as well?
Keep in mind for now you could highlight function calls by adding your own override in User settings by something like
"editor.tokenColorCustomizations": {
"textMateRules": [
{
"scope": "meta.function-call.generic",
"settings": {
"foreground":"#A6E22E"
}
}
]
}
No option to do separate method call coloring for now unfortunately.
Keep in mind for now you could highlight function calls by adding your own override in User settings by something like
"editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "meta.function-call.generic", "settings": { "foreground":"#A6E22E" } } ] }
No option to do separate method call coloring for now unfortunately.
@Adanteh I tried adding this to my settings.json but still no change to the function call color..
Keep in mind for now you could highlight function calls by adding your own override in User settings by something like
"editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "meta.function-call.generic", "settings": { "foreground":"#A6E22E" } } ] }
No option to do separate method call coloring for now unfortunately.
@Adanteh I tried adding this to my settings.json but still no change to the function call color..
@honkeat you probably placed the code in the wrong scope. It should look like this:
@honkeat you probably placed the code in the wrong scope. It should look like this:
Still doesn't work for me. Any reason why this isn't set by default, this is the only IDE I've used with this issue.
@matt-fleming the extension "Python for VSCode" was what restricted the function coloring. After disabling it and adding the overwrite from the top everything worked fine
Can we add proper instructions on the overwrite workaround? This would be very helpful.
Every function and method call is marked by meta.function-call.python
scope, that includes the entire call signature.
For every function and method call the name is marked by meta.function-call.generic.python
or by support.function.builtin.python
for builtins. The logic is that functions and methods are pretty much common bread-and-butter things that probably should be easily distinguished from builtins in most color themes. Since default color themes tend to highlight support.function
but not builtin
or support.function.builtin
specifically that's the reason for the choices of scope names.
As for overriding the color themes, there are some instructions here. They do boil down to what has already been proposed in this thread:
"editor.tokenColorCustomizations": { "textMateRules": [ { "scope": "meta.function-call.generic", "settings": { "foreground":"#A6E22E" } } ] }
why this problem has not been fixed for 2 years.
I hope this problem has not been forgotten
Its been ~3 years and this issue is still open ( T _ T ) . Please FIX this ...
I condemn Visual Studio Code developers and Microsoft for delaying this issue for 4 years and pointing people to this abandoned repository.
https://marketplace.visualstudio.com/items?itemName=evgeniypeshkov.syntax-highlighter is an alternative if you're not using pylance
@Real-Gecko Ty very much for your answer ! It's Working !