Less rust-analyzer specific onEnter

This commit is contained in:
Aleksey Kladov
2020-05-25 14:12:53 +02:00
parent e4f91bfa57
commit 76e170c3d0
11 changed files with 105 additions and 55 deletions

View File

@@ -309,7 +309,8 @@ impl Analysis {
/// Returns an edit which should be applied when opening a new line, fixing
/// up minor stuff like continuing the comment.
pub fn on_enter(&self, position: FilePosition) -> Cancelable<Option<SourceChange>> {
/// The edit will be a snippet (with `$0`).
pub fn on_enter(&self, position: FilePosition) -> Cancelable<Option<TextEdit>> {
self.with_db(|db| typing::on_enter(&db, position))
}