Merge pull request #3853 from matklad/cf
Make control token modifier less ambiguous
This commit is contained in:
@@ -20,7 +20,7 @@ use ra_vfs::LineEndings;
|
||||
|
||||
use crate::{
|
||||
req,
|
||||
semantic_tokens::{self, ModifierSet, CONSTANT, CONTROL, MUTABLE, UNSAFE},
|
||||
semantic_tokens::{self, ModifierSet, CONSTANT, CONTROL_FLOW, MUTABLE, UNSAFE},
|
||||
world::WorldSnapshot,
|
||||
Result,
|
||||
};
|
||||
@@ -378,7 +378,7 @@ impl Conv for Highlight {
|
||||
for modifier in self.modifiers.iter() {
|
||||
let modifier = match modifier {
|
||||
HighlightModifier::Definition => SemanticTokenModifier::DECLARATION,
|
||||
HighlightModifier::Control => CONTROL,
|
||||
HighlightModifier::ControlFlow => CONTROL_FLOW,
|
||||
HighlightModifier::Mutable => MUTABLE,
|
||||
HighlightModifier::Unsafe => UNSAFE,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,7 @@ pub(crate) const TYPE_ALIAS: SemanticTokenType = SemanticTokenType::new("typeAli
|
||||
pub(crate) const UNION: SemanticTokenType = SemanticTokenType::new("union");
|
||||
|
||||
pub(crate) const CONSTANT: SemanticTokenModifier = SemanticTokenModifier::new("constant");
|
||||
pub(crate) const CONTROL: SemanticTokenModifier = SemanticTokenModifier::new("control");
|
||||
pub(crate) const CONTROL_FLOW: SemanticTokenModifier = SemanticTokenModifier::new("controlFlow");
|
||||
pub(crate) const MUTABLE: SemanticTokenModifier = SemanticTokenModifier::new("mutable");
|
||||
pub(crate) const UNSAFE: SemanticTokenModifier = SemanticTokenModifier::new("unsafe");
|
||||
|
||||
@@ -56,7 +56,7 @@ pub(crate) const SUPPORTED_MODIFIERS: &[SemanticTokenModifier] = &[
|
||||
CONSTANT,
|
||||
MUTABLE,
|
||||
UNSAFE,
|
||||
CONTROL,
|
||||
CONTROL_FLOW,
|
||||
];
|
||||
|
||||
#[derive(Default)]
|
||||
|
||||
Reference in New Issue
Block a user