aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide_api/src/syntax_highlighting.rs
blob: fdd87bcfffc9a39d5b27c8f7721b1d27518a5ddd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
use ra_syntax::AstNode;
use ra_db::SourceDatabase;

use crate::{
    FileId, HighlightedRange,
    db::RootDatabase,
};

pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRange> {
    let source_file = db.parse(file_id);
    ra_ide_api_light::highlight(source_file.syntax())
}