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

Broken syntax highlighting in WGSL #3982

Closed
Chickenkeeper opened this issue Sep 26, 2022 · 3 comments
Closed

Broken syntax highlighting in WGSL #3982

Chickenkeeper opened this issue Sep 26, 2022 · 3 comments
Labels
A-tree-sitter Area: Tree-sitter C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much

Comments

@Chickenkeeper
Copy link
Contributor

Summary

WGSL code currently generates enormous amounts of erroneous error highlights.

whole lotta red

I suspect this may be because of the recent changes to the WGSL syntax. The version of tree-sitter-wgsl that the latest release of Helix uses had been updated to reflect the changes, but Helix's WGSL grammar hasn't been updated since months before the changes were introduced. Also WGSL code written with the old syntax is still highlighted as it was when wgsl support was first added (#1166).

I think it's worth noting that WGSL syntax highlighting has always been incomplete, but it was at least usable.

Reproduction Steps

No response

Helix log

No response

Platform

Windows

Terminal Emulator

PowerShell

Helix Version

helix 22.08.1 (66276ce)

@Chickenkeeper Chickenkeeper added the C-bug Category: This is a bug label Sep 26, 2022
@dead10ck
Copy link
Member

This should actually be pretty easy to fix, if you'd like to give it a try. You can copy the latest commit hash and paste it here:

source = { git = "https://github.com/szebniok/tree-sitter-wgsl", rev = "f00ff52251edbd58f4d39c9c3204383253032c11" }

Then hx --grammar fetch and hx --grammar build.

@dead10ck dead10ck added E-easy Call for participation: Experience needed to fix: Easy / not much A-tree-sitter Area: Tree-sitter labels Sep 26, 2022
@Chickenkeeper
Copy link
Contributor Author

This should actually be pretty easy to fix, if you'd like to give it a try. You can copy the latest commit hash and paste it here:

source = { git = "https://github.com/szebniok/tree-sitter-wgsl", rev = "f00ff52251edbd58f4d39c9c3204383253032c11" }

Then hx --grammar fetch and hx --grammar build.

Thanks. I've been learning more about language support in Helix and I've got a fix now. I'll post a PR soon.

@Chickenkeeper
Copy link
Contributor Author

This issue's been solved by #3996, so it can be closed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tree-sitter Area: Tree-sitter C-bug Category: This is a bug E-easy Call for participation: Experience needed to fix: Easy / not much
Projects
None yet
Development

No branches or pull requests

2 participants