aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide_api/src/lib.rs')
-rw-r--r--crates/ra_ide_api/src/lib.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/lib.rs b/crates/ra_ide_api/src/lib.rs
index f78348f74..d3456d5b2 100644
--- a/crates/ra_ide_api/src/lib.rs
+++ b/crates/ra_ide_api/src/lib.rs
@@ -462,6 +462,11 @@ impl Analysis {
462 self.with_db(|db| syntax_highlighting::highlight(db, file_id)) 462 self.with_db(|db| syntax_highlighting::highlight(db, file_id))
463 } 463 }
464 464
465 /// Computes syntax highlighting for the given file.
466 pub fn highlight_as_html(&self, file_id: FileId) -> Cancelable<String> {
467 self.with_db(|db| syntax_highlighting::highlight_as_html(db, file_id))
468 }
469
465 /// Computes completions at the given position. 470 /// Computes completions at the given position.
466 pub fn completions(&self, position: FilePosition) -> Cancelable<Option<Vec<CompletionItem>>> { 471 pub fn completions(&self, position: FilePosition) -> Cancelable<Option<Vec<CompletionItem>>> {
467 self.with_db(|db| completion::completions(db, position).map(Into::into)) 472 self.with_db(|db| completion::completions(db, position).map(Into::into))