Skip to content

Commit

Permalink
Added setting for mode dependent cursor color
Browse files Browse the repository at this point in the history
  • Loading branch information
ivenw committed Oct 9, 2022
1 parent dffb683 commit 32a55ba
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 3 additions & 3 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -338,9 +338,9 @@ impl EditorView {
let primary_cursor_scope: usize = {
if true {
match mode {
Mode::Insert => theme.find_scope_index("ui.statusline.insert"),
Mode::Select => theme.find_scope_index("ui.statusline.select"),
Mode::Normal => theme.find_scope_index("ui.statusline.normal"),
Mode::Insert => theme.find_scope_index("ui.cursor.insert"),
Mode::Select => theme.find_scope_index("ui.cursor.select"),
Mode::Normal => theme.find_scope_index("ui.cursor.normal"),
}
.unwrap_or(cursor_scope)
} else {
Expand Down
3 changes: 3 additions & 0 deletions runtime/themes/dracula.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"ui.cursor" = { fg = "background", bg = "orange", modifiers = ["dim"] }
"ui.cursor.match" = { fg = "green", modifiers = ["underlined"] }
"ui.cursor.primary" = { fg = "background", bg = "cyan", modifiers = ["dim"] }
"ui.cursor.normal" = { fg = "background", bg = "cyan" }
"ui.cursor.insert" = { fg = "background", bg = "green" }
"ui.cursor.select" = { fg = "background", bg = "purple" }
"ui.cursorline.primary" = { bg = "background_dark" }
"ui.help" = { fg = "foreground", bg = "background_dark" }
"ui.linenr" = { fg = "comment" }
Expand Down

0 comments on commit 32a55ba

Please sign in to comment.