From 5534167f58ae81deabeffeffcc0ceb0e9c58b13f Mon Sep 17 00:00:00 2001 From: cynecx Date: Thu, 22 Aug 2019 00:39:18 +0200 Subject: Fix syntax-highlighting for fields (`NAMED_FIELD_DEF`) --- crates/ra_ide_api/src/syntax_highlighting.rs | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs index 878a94f06..448acffc8 100644 --- a/crates/ra_ide_api/src/syntax_highlighting.rs +++ b/crates/ra_ide_api/src/syntax_highlighting.rs @@ -158,21 +158,17 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec { + "type" + } + NAMED_FIELD_DEF => "field", + _ => "function", + }) + .unwrap_or("function") } } else { "text" -- cgit v1.2.3