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 semantic token modifier to built-in functions #561

Closed
raptor494 opened this issue Nov 4, 2020 · 3 comments
Closed

Add semantic token modifier to built-in functions #561

raptor494 opened this issue Nov 4, 2020 · 3 comments
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@raptor494
Copy link

Feature request:

add a modifier to the function tokens that correspond to Python's built-in functions (print, dir, vars, open, etc.).
I'd like to assign the new semantic token type to support.function.builtin.python.

Situation

Before I installed this extension, I had a theme that automatically colored the Python built-in functions differently than regular functions. With semantic highlighting enabled, the built-in functions look no different than user-defined functions, and there currently isn't a way to disable semantic highlighting on a per-token basis.

Suggestion

I would like it so that the tokens for the built-in functions (print, dir, vars, open, etc.) get an extra modifier added to them, such as the standard 'defaultLibrary' modifier, so I can adjust my settings to make them colored differently.

@github-actions github-actions bot added the triage label Nov 4, 2020
@jakebailey jakebailey added the enhancement New feature or request label Nov 4, 2020
@github-actions github-actions bot removed the triage label Nov 4, 2020
@huguesv huguesv added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Nov 6, 2020
@huguesv
Copy link
Contributor

huguesv commented Nov 6, 2020

Thank you for the suggestion. This has been implemented and will be available in the next release. The new token modifier is named 'builtin'.

@raptor494
Copy link
Author

Thank you so much, this is an amazing extension and I'm very happy to see all the improvements being made!

@jakebailey
Copy link
Member

This issue has been fixed in version 2020.11.1, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#2020111-11-november-2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants