aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 3d043441..f5cba365 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -1,7 +1,7 @@
use helix_lsp::lsp;
use helix_view::{document::Mode, Document, Editor, Theme, View};
-use crate::{args::Args, compositor::Compositor, ui};
+use crate::{args::Args, compositor::Compositor, config::Config, keymap::Keymaps, ui};
use log::{error, info};
@@ -40,13 +40,14 @@ pub struct Application {
}
impl Application {
- pub fn new(mut args: Args) -> Result<Self, Error> {
+ pub fn new(mut args: Args, config: Config) -> Result<Self, Error> {
use helix_view::editor::Action;
let mut compositor = Compositor::new()?;
let size = compositor.size();
let mut editor = Editor::new(size);
- compositor.push(Box::new(ui::EditorView::new()));
+ let mut editor_view = Box::new(ui::EditorView::new(config.keymaps));
+ compositor.push(editor_view);
if !args.files.is_empty() {
let first = &args.files[0]; // we know it's not empty