Skip to content

Commit

Permalink
print out editor config on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
dead10ck committed Feb 13, 2022
1 parent f345f26 commit 05a2b5e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
9 changes: 2 additions & 7 deletions helix-core/src/syntax.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use crate::{
pub use helix_syntax::get_language;

use arc_swap::{ArcSwap, Guard};
use log::debug;
use slotmap::{DefaultKey as LayerId, HopSlotMap};

use std::{
Expand Down Expand Up @@ -142,15 +141,11 @@ impl Default for AutoPairConfig {

impl From<&AutoPairConfig> for Option<AutoPairs> {
fn from(auto_pair_config: &AutoPairConfig) -> Self {
let auto_pairs = match auto_pair_config {
match auto_pair_config {
AutoPairConfig::Enable(false) => None,
AutoPairConfig::Enable(true) => Some(AutoPairs::default()),
AutoPairConfig::Pairs(pairs) => Some(AutoPairs::new(pairs.iter())),
};

debug!("auto pairs: {:#?}", auto_pairs);

auto_pairs
}
}
}

Expand Down
3 changes: 3 additions & 0 deletions helix-view/src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use crate::{
};

use futures_util::future;
use log::debug;
use std::{
collections::{BTreeMap, HashMap},
io::stdin,
Expand Down Expand Up @@ -300,6 +301,8 @@ impl Editor {
let language_servers = helix_lsp::Registry::new();
let auto_pairs = (&config.auto_pairs).into();

debug!("Editor config: {config:#?}");

// HAXX: offset the render area height by 1 to account for prompt/commandline
area.height -= 1;

Expand Down

0 comments on commit 05a2b5e

Please sign in to comment.