aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_analysis/src/lib.rs')
-rw-r--r--crates/ra_analysis/src/lib.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_analysis/src/lib.rs b/crates/ra_analysis/src/lib.rs
index b4c7db476..f6ceb7eb2 100644
--- a/crates/ra_analysis/src/lib.rs
+++ b/crates/ra_analysis/src/lib.rs
@@ -184,6 +184,12 @@ impl Analysis {
184 let file = self.imp.file_syntax(file_id); 184 let file = self.imp.file_syntax(file_id);
185 SourceChange::from_local_edit(file_id, "join lines", ra_editor::join_lines(&file, range)) 185 SourceChange::from_local_edit(file_id, "join lines", ra_editor::join_lines(&file, range))
186 } 186 }
187 pub fn on_enter(&self, file_id: FileId, offset: TextUnit) -> Option<SourceChange> {
188 let file = self.imp.file_syntax(file_id);
189 let edit = ra_editor::on_enter(&file, offset)?;
190 let res = SourceChange::from_local_edit(file_id, "on enter", edit);
191 Some(res)
192 }
187 pub fn on_eq_typed(&self, file_id: FileId, offset: TextUnit) -> Option<SourceChange> { 193 pub fn on_eq_typed(&self, file_id: FileId, offset: TextUnit) -> Option<SourceChange> {
188 let file = self.imp.file_syntax(file_id); 194 let file = self.imp.file_syntax(file_id);
189 Some(SourceChange::from_local_edit(file_id, "add semicolon", ra_editor::on_eq_typed(&file, offset)?)) 195 Some(SourceChange::from_local_edit(file_id, "add semicolon", ra_editor::on_eq_typed(&file, offset)?))