MagicStack / MagicStack/MagicPython
Add scope for function parameter used inside function
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.4k
- Forks
- 98
- PR merge metrics
- No merged PRs in 30d
Description
Got send here from 'vscode-python' https://github.com/microsoft/vscode-python/issues/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.

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no implementation files or tests; start by locating MagicPython’s Python syntax-highlighting rules and comparing the function example’s parameter definition with its use inside the function. Done means parameter references receive a distinct TextMate scope from ordinary local variables, with coverage for the shown example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100