mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Rename back to highlight and check event's again highlight range
This commit is contained in:
parent
8f6f864547
commit
fa355d6339
2 changed files with 54 additions and 40 deletions
|
@ -425,16 +425,14 @@ impl Analysis {
|
|||
self.with_db(|db| runnables::runnables(db, file_id))
|
||||
}
|
||||
|
||||
/// Computes syntax highlighting for the given file.
|
||||
/// Computes syntax highlighting for the given file
|
||||
pub fn highlight(&self, file_id: FileId) -> Cancelable<Vec<HighlightedRange>> {
|
||||
self.with_db(|db| syntax_highlighting::highlight(db, file_id))
|
||||
self.with_db(|db| syntax_highlighting::highlight(db, file_id, None))
|
||||
}
|
||||
|
||||
/// Computes syntax highlighting for the given file range.
|
||||
pub fn highlight_range(&self, frange: FileRange) -> Cancelable<Vec<HighlightedRange>> {
|
||||
self.with_db(|db| {
|
||||
syntax_highlighting::highlight_range(db, frange.file_id, Some(frange.range))
|
||||
})
|
||||
self.with_db(|db| syntax_highlighting::highlight(db, frange.file_id, Some(frange.range)))
|
||||
}
|
||||
|
||||
/// Computes syntax highlighting for the given file.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue