diff options
author | Aleksey Kladov <[email protected]> | 2020-04-05 13:46:07 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-04-06 08:57:50 +0100 |
commit | 48bc0ca745a0ebdd61b7db3935582bf5ec95042b (patch) | |
tree | 2a9f6b1f5a9995c3bddf7a1ef829cb6890413b7d /crates/rust-analyzer/src/semantic_tokens.rs | |
parent | 6207ac90da7e607218457bf872fa32df6b78f224 (diff) |
Make control token modifier less ambiguous
In textmate, keyword.control is used for all kinds of things; in fact,
the default scope mapping for keyword is keyword.control!
So let's add a less ambiguous controlFlow modifier
See Microsoft/vscode#94367
Diffstat (limited to 'crates/rust-analyzer/src/semantic_tokens.rs')
-rw-r--r-- | crates/rust-analyzer/src/semantic_tokens.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/rust-analyzer/src/semantic_tokens.rs b/crates/rust-analyzer/src/semantic_tokens.rs index 2a66bbfd8..865fa3b1c 100644 --- a/crates/rust-analyzer/src/semantic_tokens.rs +++ b/crates/rust-analyzer/src/semantic_tokens.rs | |||
@@ -12,7 +12,7 @@ pub(crate) const TYPE_ALIAS: SemanticTokenType = SemanticTokenType::new("typeAli | |||
12 | pub(crate) const UNION: SemanticTokenType = SemanticTokenType::new("union"); | 12 | pub(crate) const UNION: SemanticTokenType = SemanticTokenType::new("union"); |
13 | 13 | ||
14 | pub(crate) const CONSTANT: SemanticTokenModifier = SemanticTokenModifier::new("constant"); | 14 | pub(crate) const CONSTANT: SemanticTokenModifier = SemanticTokenModifier::new("constant"); |
15 | pub(crate) const CONTROL: SemanticTokenModifier = SemanticTokenModifier::new("control"); | 15 | pub(crate) const CONTROL_FLOW: SemanticTokenModifier = SemanticTokenModifier::new("controlFlow"); |
16 | pub(crate) const MUTABLE: SemanticTokenModifier = SemanticTokenModifier::new("mutable"); | 16 | pub(crate) const MUTABLE: SemanticTokenModifier = SemanticTokenModifier::new("mutable"); |
17 | pub(crate) const UNSAFE: SemanticTokenModifier = SemanticTokenModifier::new("unsafe"); | 17 | pub(crate) const UNSAFE: SemanticTokenModifier = SemanticTokenModifier::new("unsafe"); |
18 | 18 | ||
@@ -56,7 +56,7 @@ pub(crate) const SUPPORTED_MODIFIERS: &[SemanticTokenModifier] = &[ | |||
56 | CONSTANT, | 56 | CONSTANT, |
57 | MUTABLE, | 57 | MUTABLE, |
58 | UNSAFE, | 58 | UNSAFE, |
59 | CONTROL, | 59 | CONTROL_FLOW, |
60 | ]; | 60 | ]; |
61 | 61 | ||
62 | #[derive(Default)] | 62 | #[derive(Default)] |