diff options
Diffstat (limited to 'crates/ra_analysis')
-rw-r--r-- | crates/ra_analysis/src/syntax_highlighting.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/syntax_highlighting.rs b/crates/ra_analysis/src/syntax_highlighting.rs index 65409beb2..0bf19eea0 100644 --- a/crates/ra_analysis/src/syntax_highlighting.rs +++ b/crates/ra_analysis/src/syntax_highlighting.rs | |||
@@ -7,6 +7,8 @@ use crate::{ | |||
7 | }; | 7 | }; |
8 | 8 | ||
9 | pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { | 9 | pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { |
10 | let file = db.source_file(file_id); | 10 | let source_file = db.source_file(file_id); |
11 | Ok(ra_editor::highlight(&file)) | 11 | let mut res = ra_editor::highlight(&source_file); |
12 | for node in source_file.syntax().descendants() {} | ||
13 | Ok(res) | ||
12 | } | 14 | } |