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

fix: Default to Python syntax highlighting theme #397

Conversation

nicolasstucki
Copy link
Contributor

This fixes #396. Changes the .starlark name suffix to .python.starlark.

By using both python and starlark, vscode is able to default to Python highlighting if a color theme defines colors specifically for python. For example, default color themes in vscode use keyword.operator.logical.python to highlight and/or/not/in.

This fixes bazelbuild#396. Changes the `.starlark` name suffix to `.python.starlark`.

By using both `python` and `starlark`, vscode is able to default to Python
highlighting if a color theme defines colors specifically for `python`.
For example, default color themes in vscode use
`keyword.operator.logical.python` to highlight `and`/`or`/`not`/`in`.
Copy link
Collaborator

@vogelsgesang vogelsgesang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.
I will wait until next Monday before merging, to give others a chance to voice their opinions

@cameron-martin
Copy link
Collaborator

I know almost nothing about textmate grammars, but it looks reasonable on the face of it.

@vogelsgesang vogelsgesang enabled auto-merge (squash) May 27, 2024 16:40
@vogelsgesang vogelsgesang changed the title fix: Default to Python syntax highlighting fix: Default to Python syntax highlighting theme May 27, 2024
@vogelsgesang vogelsgesang merged commit 2614f19 into bazelbuild:master May 27, 2024
2 checks passed
@vogelsgesang
Copy link
Collaborator

Thanks again for the pull request, @nicolasstucki! Merged 🙂

@nicolasstucki nicolasstucki deleted the use-python-highlighting-by-default branch May 28, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Syntax highlighting of and/or/not/in in Starlark
3 participants