aboutsummaryrefslogtreecommitdiff
path: root/crates/parser/src/token_set.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-12 16:45:21 +0100
committerGitHub <[email protected]>2020-10-12 16:45:21 +0100
commit3f96c9b3cc214ded2e9326a0e65ce02b5ea2bd65 (patch)
tree6f63f40cfa5c337cf922883ddcbc73a80c407ad7 /crates/parser/src/token_set.rs
parent05faeb50f3d78aac24b9581e846d010d815d7747 (diff)
parent49d824a99d3bc344eb03a9139f1fb99a0e5d30c0 (diff)
Merge #6137
6137: add a new TextMate grammar r=matklad a=dustypomerleau Thanks to everyone working hard on Rust Analyzer - my impression is that it's quickly becoming the community default. I think it would be helpful to have a more robust TextMate grammar to fall back on, for those who wish to disable semantic highlighting for any reason. It should allow theming of punctuation, and provide scopes for all tokens on the page. This can be done at zero cost to those who enable semantic highlighting, as the TextMate scopes will be invisible to those users. I can see a couple ways of accomplishing this: 1. Ship a new grammar by merging this PR. 1. Ship no TextMate grammar at all (like the [Rust](https://marketplace.visualstudio.com/items?itemName=rust-lang.rust) extension), and allow users to install a separate extension that provides the grammar of their choice (I have released this one as [Rust Syntax](https://marketplace.visualstudio.com/items?itemName=dustypomerleau.rust-syntax)). If no grammar were installed, they would simply fall back to the default grammar provided by their editor. In the case of VS Code, the default grammar already matches what is currently being shipped, so users who choose not to override it would see no difference. I have tried to choose sensible default scopes, in the hopes that a wider variety of themes would work out of the box with Rust, even if those themes do not yet supply scopes for semantic highlighting. There is definitely some interest in using this grammar with Rust Analyzer, as this was the very first issue after the syntax extension was shipped: https://github.com/dustypomerleau/rust-syntax/issues/1. I considered simply using an alternative grammar alongside Rust Analyzer, but this doesn't seem possible. When RA starts, any existing grammar/extension is overridden, and I haven't been able to find a workaround. Co-authored-by: Dusty Pomerleau <[email protected]>
Diffstat (limited to 'crates/parser/src/token_set.rs')
0 files changed, 0 insertions, 0 deletions