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

Improve python highlighting #3103

Merged
merged 6 commits into from
Jul 26, 2022
Merged

Improve python highlighting #3103

merged 6 commits into from
Jul 26, 2022

Conversation

kirawi
Copy link
Member

@kirawi kirawi commented Jul 18, 2022

These changes were based on nvim-treesitter.

  • Highlight import identifiers as @namespace
  • Highlight boolean values as @constant.builtin.boolean
  • Made @keyword captures more granular with the existing scopes. No new scopes were introduced.
  • Added @punctuation captures.

@ChrHorn
Copy link
Contributor

ChrHorn commented Jul 19, 2022

Nice, I planned to go over it myself.

Could you also add the missing punctuations?
https://github.com/nvim-treesitter/nvim-treesitter/blob/8b748a7570b89822d47ac0ed0f694efda6523c7d/queries/python/highlights.scm#L252-L258

@archseer archseer merged commit 0a2646e into helix-editor:master Jul 26, 2022
@kirawi kirawi deleted the python branch July 26, 2022 01:18
thomasskk pushed a commit to thomasskk/helix that referenced this pull request Sep 9, 2022
* improve python queries

* update python grammar to `0.20.2`

* fix variadic parameter scope

* add punctuation scopes

* fix order of punctuation scopes

* undo  `embedded` delete
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.

3 participants