From 9146a64386b0ae0c5f680fcca5e0cd08a8844e85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Tue, 28 May 2019 21:27:54 +0300 Subject: Highlight type names correctly --- crates/ra_ide_api/src/snapshots/highlighting.html | 5 +++-- crates/ra_ide_api/src/syntax_highlighting.rs | 18 +++++++++++++++++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/crates/ra_ide_api/src/snapshots/highlighting.html b/crates/ra_ide_api/src/snapshots/highlighting.html index ebd187a35..2a32b3241 100644 --- a/crates/ra_ide_api/src/snapshots/highlighting.html +++ b/crates/ra_ide_api/src/snapshots/highlighting.html @@ -18,13 +18,14 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4e .keyword\.control { color: #DC8CC3; }
#[derive(Clone, Debug)]
-struct Foo {
+struct Foo {
     pub x: i32,
     pub y: i32,
 }
 
-fn foo<T>() -> T {
+fn foo<T>() -> T {
     unimplemented!();
+    foo::<i32>();
 }
 
 // comment
diff --git a/crates/ra_ide_api/src/syntax_highlighting.rs b/crates/ra_ide_api/src/syntax_highlighting.rs
index dcefb0513..739b898d2 100644
--- a/crates/ra_ide_api/src/syntax_highlighting.rs
+++ b/crates/ra_ide_api/src/syntax_highlighting.rs
@@ -1,6 +1,8 @@
 use rustc_hash::{FxHashSet, FxHashMap};
 
-use ra_syntax::{ast, AstNode, TextRange, Direction, SmolStr, SyntaxKind, SyntaxKind::*, SyntaxElement, T};
+use ra_syntax::{
+    ast, AstNode, TextRange, Direction, SmolStr, SyntaxKind, SyntaxKind::*, SyntaxElement, T,
+};
 use ra_db::SourceDatabase;
 use ra_prof::profile;
 
@@ -116,6 +118,19 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec() -> T {
     unimplemented!();
+    foo::();
 }
 
 // comment
-- 
cgit v1.2.3