Skip to content

Commit

Permalink
Add ui.selection to theme.toml
Browse files Browse the repository at this point in the history
Enables changing the color of the selection which was previously
hard coded.
  • Loading branch information
sudormrfbin authored and archseer committed Jun 14, 2021
1 parent 9cfa163 commit f33aaba
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions book/src/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ Possible keys:
| ui.text | |
| ui.text.focus | |
| ui.menu.selected | |
| ui.selection | for selections in the editing area |
| warning | LSP warning |
| error | LSP error |
| info | LSP info |
Expand Down
1 change: 1 addition & 0 deletions contrib/themes/bogster.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"ui.text" = { fg = "#e5ded6" }
"ui.text.focus" = { fg = "#e5ded6", modifiers= ["bold"] }

"ui.selection" = { bg = "#540099" }
"ui.menu.selected" = { fg = "#e5ded6", bg = "#313f4e" }

"warning" = "#dc7759"
Expand Down
1 change: 1 addition & 0 deletions contrib/themes/ingrid.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"ui.text" = { fg = "#7B91B3" }
"ui.text.focus" = { fg = "#250E07", modifiers= ["bold"] }

"ui.selection" = { bg = "#540099" }
"ui.menu.selected" = { fg = "#D74E50", bg = "#F3EAE9" }

"warning" = "#D4A520"
Expand Down
1 change: 1 addition & 0 deletions contrib/themes/onedark.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"ui.linenr" = { fg = "#4B5263", modifiers = ['dim'] }
"ui.popup" = { bg = "#3E4452" }
"ui.statusline" = { fg = "#ABB2BF", bg = "#2C323C" }
"ui.selection" = { bg = "#3E4452" }
"ui.text" = { fg = "#ABB2BF", bg = "#282C34" }
"ui.text.focus" = { fg = "#ABB2BF", bg = "#2C323C", modifiers = ['bold'] }
"ui.window" = { bg = "#3E4452" }
3 changes: 1 addition & 2 deletions helix-term/src/ui/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,7 @@ impl EditorView {
// .bg(Color::Rgb(255, 255, 255))
.add_modifier(Modifier::REVERSED);

// let selection_style = Style::default().bg(Color::Rgb(94, 0, 128));
let selection_style = Style::default().bg(Color::Rgb(84, 0, 153));
let selection_style = theme.get("ui.selection");

for selection in doc
.selection(view.id)
Expand Down
1 change: 1 addition & 0 deletions theme.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"ui.text" = { fg = "#a4a0e8" } # lavender
"ui.text.focus" = { fg = "#dbbfef"} # lilac

"ui.selection" = { bg = "#540099" }
"ui.menu.selected" = { fg = "#281733", bg = "#ffffff" } # revolver

"warning" = "#ffcd1c"
Expand Down

0 comments on commit f33aaba

Please sign in to comment.