diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs index 0e9aa5f1f9dcb..8bc2426525a92 100644 --- a/helix-term/src/ui/editor.rs +++ b/helix-term/src/ui/editor.rs @@ -113,7 +113,10 @@ impl EditorView { } } - Self::highlight_cursorline(doc, view, surface, theme); + log::info!("{:?}", editor.config().cursorline); + if editor.config().cursorline { + Self::highlight_cursorline(doc, view, surface, theme); + } let highlights = Self::doc_syntax_highlights(doc, view.offset, inner.height, theme); let highlights = syntax::merge(highlights, Self::doc_diagnostics_highlights(doc, theme)); diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index dd805c000dc43..d7e499c515ec8 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -117,6 +117,8 @@ pub struct Config { pub shell: Vec, /// Line number mode. pub line_number: LineNumber, + /// Highlight the lines cursors are currently on. Defaults to false. + pub cursorline: bool, /// Gutters. Default ["diagnostics", "line-numbers"] pub gutters: Vec, /// Middle click paste support. Defaults to true. @@ -273,6 +275,7 @@ impl Default for Config { vec!["sh".to_owned(), "-c".to_owned()] }, line_number: LineNumber::Absolute, + cursorline: false, gutters: vec![GutterType::Diagnostics, GutterType::LineNumbers], middle_click_paste: true, auto_pairs: AutoPairConfig::default(),