Add scope for function parameter used inside function
Cielquan opened this issue · comments
Got send here from 'vscode-python' microsoft/vscode-python#11594
def function(param1):
x = 1
return param1 * x
Both x
and param1
are variables used inside the function
, but param1
is a given parameter.
In the function def line param1
has a special scope but not when used inside the function.
I'd like to have it have a special textmate scope too so I can color it and see, when I use a parameter and when a 'normal' variable.
The left side is what I want (from PyCharm) and the right side is as currently is.
Workaround: the new Pylance
language server adds semantic highlighting which "fixes" this: https://github.com/microsoft/pylance-release#semantic-highlighting