Start work on handling snippet completions

This commit is contained in:
Max Brunsfeld 2022-02-01 15:35:02 -08:00
parent 680fde9608
commit 7270fd00ba
5 changed files with 75 additions and 8 deletions

View file

@ -1777,13 +1777,11 @@ impl Buffer {
}
}
pub fn apply_completion(
pub fn apply_additional_edits_for_completion(
&mut self,
completion: Completion<Anchor>,
cx: &mut ModelContext<Self>,
) -> Option<Task<Result<()>>> {
self.edit_with_autoindent([completion.old_range], completion.new_text.clone(), cx);
self.file.as_ref()?.as_local()?;
let server = self.language_server.as_ref()?.server.clone();
Some(cx.spawn(|this, mut cx| async move {