From a5ef8ad05b7c1f7148c59814b55d641fd75aff75 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 19 Dec 2018 15:04:15 +0300 Subject: swtich lsp server to vfs --- crates/ra_analysis/src/lib.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'crates/ra_analysis/src/lib.rs') diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs index b806c974d..8882feca3 100644 --- a/crates/ra_analysis/src/lib.rs +++ b/crates/ra_analysis/src/lib.rs @@ -44,8 +44,9 @@ pub use ra_db::{ #[derive(Default)] pub struct AnalysisChange { + new_roots: Vec, roots_changed: FxHashMap, - files_changed: Vec<(FileId, String)>, + files_changed: Vec<(FileId, Arc)>, libraries_added: Vec, crate_graph: Option, } @@ -93,6 +94,9 @@ impl AnalysisChange { pub fn new() -> AnalysisChange { AnalysisChange::default() } + pub fn add_root(&mut self, root_id: SourceRootId) { + self.new_roots.push(root_id); + } pub fn add_file( &mut self, root_id: SourceRootId, @@ -111,7 +115,7 @@ impl AnalysisChange { .added .push(file); } - pub fn change_file(&mut self, file_id: FileId, new_text: String) { + pub fn change_file(&mut self, file_id: FileId, new_text: Arc) { self.files_changed.push((file_id, new_text)) } pub fn remove_file(&mut self, root_id: SourceRootId, file_id: FileId, path: RelativePathBuf) { -- cgit v1.2.3