Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add scope for function parameter used inside function

Open
#208 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
38/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
javascript, python
Domain
devtools, tooling

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.

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

Dominant language
JavaScript
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MagicStack/MagicPython

All issues in MagicStack/MagicPython

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.