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

Incorporate changes made in Helix highlight queries #356

Merged
merged 1 commit into from
Feb 18, 2024

Conversation

alex-pinkus
Copy link
Owner

In helix-editor/helix#9586, the Helix editor added highlighting for the any keyword.

However, while reviewing that, I noticed that both some and any should be more specific: these keywords are legal as identifiers, but should not be highlighted as identifiers when they are keywords.

For instance, I can write:

let any: any Protocol = AnyImplementation()

In this example, only the second any should be highlighted.

See discussion on #351.

cc @7ombie

In helix-editor/helix#9586, the Helix editor added highlighting for the
`any` keyword.

However, while reviewing that, I noticed that both `some` and `any`
should be more specific: these keywords are legal as identifiers, but
should not be highlighted as identifiers when they are keywords.

For instance, I can write:
```
let any: any Protocol = AnyImplementation()
```

In this example, only the second `any` should be highlighted.

See discussion on #351
@7ombie
Copy link

7ombie commented Feb 18, 2024

Nice catch!

There's a pitch for doing something similar with then, though it's still in the pipeline.

I'm not sure if they're planning to convert these contextual keywords to strict keywords in future versions, or if we'll always be able to use them as variables too. Worth considering, longer term.

Well spotted though.

@alex-pinkus alex-pinkus merged commit c3fefbd into main Feb 18, 2024
55 checks passed
@alex-pinkus alex-pinkus deleted the any-keyword-highlight branch February 18, 2024 22:03
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