summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.config/nvim/plugin/40-colors.lua25
1 files changed, 6 insertions, 19 deletions
diff --git a/.config/nvim/plugin/40-colors.lua b/.config/nvim/plugin/40-colors.lua
index ae5f085..32ae452 100644
--- a/.config/nvim/plugin/40-colors.lua
+++ b/.config/nvim/plugin/40-colors.lua
@@ -64,26 +64,13 @@ local function adjust_highlight()
end
end
--- Theme-aware cursor line, one focus hue (green on dark, magenta/pink on light)
--- at two intensities. CursorLineNr stays visible on closed folds (the number
--- column is NOT painted by Folded), so it carries the focus cue: active window
--- a muted "mix" of the hue, unfocused windows a bright bold badge of the same
--- hue. The cursor-line background backs this up: active a subtle neutral "mix"
--- tint (light enough to edit on, distinct from Folded), unfocused the muted
--- hue wash.
+-- Active and inactive cursorline highlight
local function set_cursorline_hl()
- local active, muted, badge
- if vim.o.background == "light" then
- active, muted = solarized_colors.mix_blue_light, solarized_colors.mix_magenta_light
- badge = { bg = solarized_colors.magenta, fg = solarized_colors.base3, bold = true }
- else
- active, muted = solarized_colors.mix_base1, solarized_colors.mix_green
- badge = { bg = solarized_colors.green, fg = solarized_colors.base03, bold = true }
- end
- vim.api.nvim_set_hl(ns_active, "CursorLine", { bg = active })
- vim.api.nvim_set_hl(ns_active, "CursorLineNr", { bg = muted })
- vim.api.nvim_set_hl(ns_inactive, "CursorLine", { bg = muted })
- vim.api.nvim_set_hl(ns_inactive, "CursorLineNr", badge)
+ local accent = vim.o.background == "light" and solarized_colors.mix_blue_light or solarized_colors.mix_base1
+ vim.api.nvim_set_hl(ns_active, "CursorLine", { bg = accent })
+ vim.api.nvim_set_hl(ns_active, "CursorLineNr", { bg = accent })
+ vim.api.nvim_set_hl(ns_inactive, "CursorLine", { bg = accent, underline = true })
+ vim.api.nvim_set_hl(ns_inactive, "CursorLineNr", { bg = accent, underline = true })
end
local function apply_highlights()