aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/lib.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-05-25 11:48:47 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-05-25 11:48:47 +0100
commit91bd783273477d5709ea4bb891355e9aa9a7cdfe (patch)
tree606a17d688e931e35fe45eefd6c13c0baf7bd5bb /crates/ra_ide_api/src/lib.rs
parent9800699bab04e97996f0aebec528714165a2619b (diff)
parentc6e905a79f7ba083b3f97728aa3a74fb0e03661b (diff)
Merge #1327
1327: Colorize Rust code as HTML r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
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))