aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/syntax_highlighting.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs23
1 files changed, 10 insertions, 13 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index c5d249fe8..174e13595 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -320,19 +320,16 @@ pub(crate) fn highlight_as_html(db: &RootDatabase, file_id: FileId, rainbow: boo
320fn highlight_name(db: &RootDatabase, name_kind: NameKind) -> &'static str { 320fn highlight_name(db: &RootDatabase, name_kind: NameKind) -> &'static str {
321 match name_kind { 321 match name_kind {
322 Macro(_) => tags::MACRO, 322 Macro(_) => tags::MACRO,
323 Field(_) => tags::FIELD, 323 StructField(_) => tags::FIELD,
324 AssocItem(hir::AssocItem::Function(_)) => tags::FUNCTION, 324 ModuleDef(hir::ModuleDef::Module(_)) => tags::MODULE,
325 AssocItem(hir::AssocItem::Const(_)) => tags::CONSTANT, 325 ModuleDef(hir::ModuleDef::Function(_)) => tags::FUNCTION,
326 AssocItem(hir::AssocItem::TypeAlias(_)) => tags::TYPE, 326 ModuleDef(hir::ModuleDef::Adt(_)) => tags::TYPE,
327 Def(hir::ModuleDef::Module(_)) => tags::MODULE, 327 ModuleDef(hir::ModuleDef::EnumVariant(_)) => tags::CONSTANT,
328 Def(hir::ModuleDef::Function(_)) => tags::FUNCTION, 328 ModuleDef(hir::ModuleDef::Const(_)) => tags::CONSTANT,
329 Def(hir::ModuleDef::Adt(_)) => tags::TYPE, 329 ModuleDef(hir::ModuleDef::Static(_)) => tags::CONSTANT,
330 Def(hir::ModuleDef::EnumVariant(_)) => tags::CONSTANT, 330 ModuleDef(hir::ModuleDef::Trait(_)) => tags::TYPE,
331 Def(hir::ModuleDef::Const(_)) => tags::CONSTANT, 331 ModuleDef(hir::ModuleDef::TypeAlias(_)) => tags::TYPE,
332 Def(hir::ModuleDef::Static(_)) => tags::CONSTANT, 332 ModuleDef(hir::ModuleDef::BuiltinType(_)) => tags::TYPE_BUILTIN,
333 Def(hir::ModuleDef::Trait(_)) => tags::TYPE,
334 Def(hir::ModuleDef::TypeAlias(_)) => tags::TYPE,
335 Def(hir::ModuleDef::BuiltinType(_)) => tags::TYPE_BUILTIN,
336 SelfType(_) => tags::TYPE_SELF, 333 SelfType(_) => tags::TYPE_SELF,
337 TypeParam(_) => tags::TYPE_PARAM, 334 TypeParam(_) => tags::TYPE_PARAM,
338 Local(local) => { 335 Local(local) => {