aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r--crates/ra_ide/src/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/crates/ra_ide/src/lib.rs b/crates/ra_ide/src/lib.rs
index 82e10bc7e..d22870669 100644
--- a/crates/ra_ide/src/lib.rs
+++ b/crates/ra_ide/src/lib.rs
@@ -425,9 +425,14 @@ impl Analysis {
425 self.with_db(|db| runnables::runnables(db, file_id)) 425 self.with_db(|db| runnables::runnables(db, file_id))
426 } 426 }
427 427
428 /// Computes syntax highlighting for the given file. 428 /// Computes syntax highlighting for the given file
429 pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> { 429 pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> {
430 self.with_db(|db| syntax_highlighting::highlight(db, file_id)) 430 self.with_db(|db| syntax_highlighting::highlight(db, file_id, None))
431 }
432
433 /// Computes syntax highlighting for the given file range.
434 pub fn highlight_range(&self, frange: FileRange) -> Cancelable<Vec<HighlightedRange>> {
435 self.with_db(|db| syntax_highlighting::highlight(db, frange.file_id, Some(frange.range)))
431 } 436 }
432 437
433 /// Computes syntax highlighting for the given file. 438 /// Computes syntax highlighting for the given file.