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

Highlighting breaks with Helix editor #79

Closed
tynanbe opened this issue Jan 11, 2024 · 4 comments
Closed

Highlighting breaks with Helix editor #79

tynanbe opened this issue Jan 11, 2024 · 4 comments

Comments

@tynanbe
Copy link
Member

tynanbe commented Jan 11, 2024

It looks like it stopped working at this commit: b7ae2c9

@the-mikedavis
Copy link
Member

Do you have custom config in ~/.config/helix/languages.toml to update the [[grammar]] block? Generally you can't update the parser alone - if there are breaking changes like in 23d2b89 (the parent of the commit you linked) then the queries might fail to compile.

Also see helix-editor/helix#9003 - that PR has the updates for the queries that should fix query compilation.

@tynanbe
Copy link
Member Author

tynanbe commented Jan 12, 2024

Using Helix v23.10, with this in languages.toml:

[[grammar]]
name = "gleam"

[grammar.source]
git = "https://github.com/gleam-lang/tree-sitter-gleam"
rev = "23d2b896514087d97f75a62035b325a4704cbae5"

I do see an error in helix.log stating that the Gleam queries couldn't be parsed, after running the following with any rev newer than the above.

> hx --grammar fetch && hx --grammar build

Sounds like I need a newer Helix build?

@the-mikedavis
Copy link
Member

Yep you need the updates to the highlight query that lives in runtime/queries/gleam/highlights.scm. You can overwrite the one in ~/.config/helix/runtime/queries/gleam/highlights.scm (or $HELIX_RUNTIME/queries/gleam/highlights.scm if you set the HELIX_RUNTIME environment variable) with the latest one from the Helix repo if you don't want to rebuild Helix from source.

@tynanbe
Copy link
Member Author

tynanbe commented Jan 12, 2024

Sure enough, the updated queries resolved the issue. Thanks very much; sorry for taking your time!

@tynanbe tynanbe closed this as completed Jan 12, 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

No branches or pull requests

2 participants