Consolidate logic for completion alongside code actions in Project
This way, completions are dealt with more consistently with code actions, and the logic is not spread across so many places. The `language::File` trait and the multibuffer no longer need to deal with completions. Completions are no longer generic over an anchor type.
This commit is contained in:
@@ -145,7 +145,12 @@ impl ProjectDiagnosticsEditor {
|
||||
let excerpts = cx.add_model(|cx| MultiBuffer::new(project.read(cx).replica_id()));
|
||||
let build_settings = editor::settings_builder(excerpts.downgrade(), settings.clone());
|
||||
let editor = cx.add_view(|cx| {
|
||||
let mut editor = Editor::for_buffer(excerpts.clone(), build_settings.clone(), cx);
|
||||
let mut editor = Editor::for_buffer(
|
||||
excerpts.clone(),
|
||||
build_settings.clone(),
|
||||
Some(workspace.clone()),
|
||||
cx,
|
||||
);
|
||||
editor.set_vertical_scroll_margin(5, cx);
|
||||
editor
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user