feat: CursorLine contrast option

This commit is contained in:
Michael Chris Lopez
2021-11-03 16:16:52 +08:00
parent 3270dc5fab
commit b3cda0abb3
3 changed files with 4 additions and 2 deletions

View File

@@ -56,7 +56,7 @@ local function generate(p, opt)
TermCursor { Cursor }, -- cursor in a focused terminal
TermCursorNC { lCursor }, -- cursor in an unfocused terminal
CursorLine { bg = p1.bg.li(4) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
CursorLine { bg = p1.bg.li(opt.lighten_cursor_line or 4) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
CursorColumn { CursorLine }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
ColorColumn { bg = p.wood.saturation(46).lightness(p1.bg.l + 18) }, -- used for the columns set with 'colorcolumn'

View File

@@ -37,6 +37,7 @@ function M.get_global_config(prefix, base_bg)
"darken_comments",
"darken_line_nr",
"darken_non_text",
"darken_cursor_line",
}),
common
)
@@ -49,6 +50,7 @@ function M.get_global_config(prefix, base_bg)
"lighten_comments",
"lighten_line_nr",
"lighten_non_text",
"lighten_cursor_line",
}),
common
)

View File

@@ -56,7 +56,7 @@ local function generate(p, opt)
TermCursor { Cursor }, -- cursor in a focused terminal
TermCursorNC { lCursor }, -- cursor in an unfocused terminal
CursorLine { bg = p1.bg.da(3) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
CursorLine { bg = p1.bg.da(opt.darken_cursor_line or 3) }, -- Screen-line at the cursor, when 'cursorline' is set. Low-priority if foreground (ctermfg OR guifg) is not set.
CursorColumn { CursorLine }, -- Screen-column at the cursor, when 'cursorcolumn' is set.
ColorColumn { bg = p.wood.saturation(46).lightness(p1.bg.l - 12) }, -- used for the columns set with 'colorcolumn'