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 syntax grammar for Rust #113481

Closed
wants to merge 1 commit into from
Closed

Update syntax grammar for Rust #113481

wants to merge 1 commit into from

Conversation

zakcutner
Copy link

Hello! I wanted to update to a newer version of Rust syntax grammar that fixes a bug in dustypomerleau/rust-syntax#12 where lifetimes couldn't be included within macro attributes. Without this, large parts of some files that I am working on are mistakenly highlighted as an unclosed quotation. It seems this is also related to #64488.

@dustypomerleau
Copy link
Contributor

@alexr00 has mentioned in the past that the latest Textmate grammars are scraped roughly once a month, so—correct me if I'm wrong, Alex—I believe no action is needed to get the upstream changes from Rust Syntax merged. In the interim, you can use the Rust Syntax extension, which should play nicely with Rust Analyzer now that RA is not shipping a grammar. The Textmate scopes will only be visible with "[rust]": { "editor.semanticHighlighting.enabled": false } in your settings.json, otherwise RA will override with semantic scopes.

Regarding #64488, I think it should probably be closed at this point. The grammar still needs minor improvements—which I am working on—but the essence of the issue has been fixed. In truth, most serious Rustaceans are using semantic highlighting via Rust Analyzer, but the current grammar provides reasonable default VS Code highlighting.

@alexr00
Copy link
Member

alexr00 commented Dec 30, 2020

@dustypomerleau is correct. I usually re-scrape all grammars at the beginning of an iteration, but if someone pings me to say that a very valuable fix is available I can update again.

So @zakcutner thank you for the PR! However, the script we use to update grammars includes some other changes, like the commit and version number. I've just pulled in the latest Rust grammar with 92d4b14 to pick up the change you mentioned and it will be in the next Insiders build (which will be in the first week of January, we paused it for the holidays).

@alexr00 alexr00 closed this Dec 30, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Feb 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants