Skip to content

Commit

Permalink
Create cursorline config key
Browse files Browse the repository at this point in the history
  • Loading branch information
TobTobXX committed Apr 20, 2022
1 parent f9f33e0 commit 9e06157
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ impl EditorView {
}
}

Self::highlight_cursorline(doc, view, surface, theme);
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));
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 @@ -117,6 +117,8 @@ pub struct Config {
pub shell: Vec<String>,
/// 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<GutterType>,
/// Middle click paste support. Defaults to true.
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 9e06157

Please sign in to comment.