diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-02-25 21:11:33 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-02-25 21:11:33 +0000 |
commit | ae0aeb1b23aa4bc96a7113de784799365c2b4358 (patch) | |
tree | 4bbcd2d9eb4ac67cf50ba12918c87a41fb5a9624 /crates/ra_ide/src/lib.rs | |
parent | d3040c0deba8266044029a6479a1c12c28e72750 (diff) | |
parent | fa355d6339d7b5ccfd4b1a96f035a4366e8152fe (diff) |
Merge #3307
3307: Semantic Ranges r=matklad a=kjeremy
Co-authored-by: Jeremy Kolb <[email protected]>
Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_ide/src/lib.rs')
-rw-r--r-- | crates/ra_ide/src/lib.rs | 9 |
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. |