|
|
|
@ -12,11 +12,11 @@ use serde_json::json;
|
|
|
|
|
use crate::{
|
|
|
|
|
args::Args,
|
|
|
|
|
commands::apply_workspace_edit,
|
|
|
|
|
compositor::{Compositor, Event},
|
|
|
|
|
compositor::{self, Compositor, Event},
|
|
|
|
|
config::Config,
|
|
|
|
|
job::Jobs,
|
|
|
|
|
keymap::Keymaps,
|
|
|
|
|
ui::{self, overlay::overlayed},
|
|
|
|
|
ui::{self, overlay::overlayed, Explorer},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
use log::{error, warn};
|
|
|
|
@ -153,7 +153,19 @@ impl Application {
|
|
|
|
|
let keys = Box::new(Map::new(Arc::clone(&config), |config: &Config| {
|
|
|
|
|
&config.keys
|
|
|
|
|
}));
|
|
|
|
|
let editor_view = Box::new(ui::EditorView::new(Keymaps::new(keys)));
|
|
|
|
|
let mut editor_view = Box::new(ui::EditorView::new(Keymaps::new(keys)));
|
|
|
|
|
|
|
|
|
|
if args.show_explorer {
|
|
|
|
|
let mut jobs = Jobs::new();
|
|
|
|
|
let mut context = compositor::Context {
|
|
|
|
|
editor: &mut editor,
|
|
|
|
|
scroll: None,
|
|
|
|
|
jobs: &mut jobs,
|
|
|
|
|
};
|
|
|
|
|
let mut explorer = Explorer::new(&mut context)?;
|
|
|
|
|
explorer.unfocus();
|
|
|
|
|
editor_view.explorer = Some(overlayed(explorer));
|
|
|
|
|
}
|
|
|
|
|
compositor.push(editor_view);
|
|
|
|
|
|
|
|
|
|
if args.load_tutor {
|
|
|
|
|