Move highlighting and matching_brace

This commit is contained in:
Wilco Kusee 2019-03-23 17:34:49 +01:00
parent a656b891fb
commit a3711e08dc
7 changed files with 166 additions and 164 deletions

View file

@ -1,6 +1,5 @@
use itertools::Itertools;
use hir::{Problem, source_binder};
use ra_ide_api_light::Severity;
use ra_db::SourceDatabase;
use ra_syntax::{
Location, SourceFile, SyntaxKind, TextRange, SyntaxNode,
@ -11,6 +10,12 @@ use ra_text_edit::{TextEdit, TextEditBuilder};
use crate::{Diagnostic, FileId, FileSystemEdit, SourceChange, SourceFileEdit, db::RootDatabase};
#[derive(Debug, Copy, Clone)]
pub enum Severity {
Error,
WeakWarning,
}
pub(crate) fn diagnostics(db: &RootDatabase, file_id: FileId) -> Vec<Diagnostic> {
let source_file = db.parse(file_id);
let mut res = Vec::new();