The Wayback Machine - https://web.archive.org/web/20201206081146/https://github.com/MagicStack/MagicPython/issues/208
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scope for function parameter used inside function #208

Open
Cielquan opened this issue May 6, 2020 · 1 comment
Open

Add scope for function parameter used inside function #208

Cielquan opened this issue May 6, 2020 · 1 comment

Comments

@Cielquan
Copy link

@Cielquan Cielquan commented May 6, 2020

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.
image

@Cielquan
Copy link
Author

@Cielquan Cielquan commented Dec 3, 2020

Workaround: the new Pylance language server adds semantic highlighting which "fixes" this: https://github.com/microsoft/pylance-release#semantic-highlighting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.