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: Rust highlights (regression from the reverse-query-precedence PR) #12795

Merged
merged 16 commits into from
Feb 7, 2025

Conversation

nik-rev
Copy link
Contributor

@nik-rev nik-rev commented Feb 6, 2025

This PR fixes some minor things as well as regressions from the query precedence PR

Regressions

Derive Regression

Before

Image

Regression

Image

Enum Regression

Before

image

Regression

Image

Prelude Regression

Fixed by moving the prelude later to give it higher priority over other queries

Before

Image

Regression

Image

Constructor Regression

Fixed by moving the constructor queries after the PascalCase identifiers to give it higher priority

Before

Image

Regression

Image

Fixes

Incorrect angle bracket color

Before

Image

After

Image

! not an operator here

Before

Image

After

Image

Angled For brackets

Before

image

After

image

@the-mikedavis
Copy link
Member

I'm not really a fan of the constant highlight for (), it's not exactly a value

@nik-rev
Copy link
Contributor Author

nik-rev commented Feb 6, 2025

I'm not really a fan of the constant highlight for (), it's not exactly a value

Ok, then I'll remove it from Haskell as well for consistency

@nik-rev nik-rev force-pushed the fix-rust-highlights branch from 8906683 to 65d74ee Compare February 6, 2025 14:18
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

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

I tested this for a while yesterday and I think it looks good, I haven't run into any other (fixable) regressions yet. There are still some issues with attributes:

bug

I looked into that for a while though and I don't think it's an easy fix - the bug is in the highlighter rather than the queries. It will be fixed when we switch to the new highlighter (#10286) anyways

@the-mikedavis the-mikedavis merged commit 1b89f99 into helix-editor:master Feb 7, 2025
6 checks passed
@nik-rev nik-rev deleted the fix-rust-highlights branch February 7, 2025 15:21
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.

2 participants