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

Update gleam grammar #6641

Merged
merged 2 commits into from
Apr 9, 2023
Merged

Update gleam grammar #6641

merged 2 commits into from
Apr 9, 2023

Conversation

arnarg
Copy link
Contributor

@arnarg arnarg commented Apr 7, 2023

Adds support for the new let assert ... as only assert ... has been deprecated in gleam.

Adds support for the new `let assert ...` as only `assert ...` has been deprecated in gleam.
@archseer
Copy link
Member

archseer commented Apr 8, 2023

@arnarg
Copy link
Contributor Author

arnarg commented Apr 8, 2023

Can you also add panic to keywords? gleam-lang/tree-sitter-gleam@d14acab#diff-d485a982e458ef8da2cc203585065b7542665cb80b78d230b1e8f77ea25825d4R81

According to the git history this should already be included in the v0.27.0 tagged commit I used in the PR.

Or am I misunderstanding something?

@the-mikedavis
Copy link
Member

You can highlight panic as a keyword by adding it to the highlights.scm queries:

; Keywords
[
(visibility_modifier) ; "pub"
(opacity_modifier) ; "opaque"
"as"
"assert"
"case"
"const"
"external"
"fn"
"if"
"import"
"let"
"todo"
"try"
"type"
"use"
] @keyword

Updating the repository updates the tree-sitter parser but we also need the queries in this repo for syntax highlighting.

@arnarg
Copy link
Contributor Author

arnarg commented Apr 8, 2023

Ah gotcha, my bad! I have added it now.

@the-mikedavis the-mikedavis merged commit 6dabd36 into helix-editor:master Apr 9, 2023
Triton171 pushed a commit to Triton171/helix that referenced this pull request Jun 18, 2023
wes-adams pushed a commit to wes-adams/helix that referenced this pull request Jul 4, 2023
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
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