summaryrefslogtreecommitdiffstats
path: root/plugin
diff options
context:
space:
mode:
authorThomas Vanbesien <tvanbesi@proton.me>2026-06-07 19:53:32 +0200
committerThomas Vanbesien <tvanbesi@proton.me>2026-06-07 19:53:32 +0200
commit3f13b53ba92c82368c4aa08e75be2a90f5e16ab0 (patch)
treea917fba7b3f4c998b57282ec649448b03e48be92 /plugin
parent01a6ce7ff682fca976649066e441456fb42da9a0 (diff)
downloadnvim-config-3f13b53ba92c82368c4aa08e75be2a90f5e16ab0.tar.gz
nvim-config-3f13b53ba92c82368c4aa08e75be2a90f5e16ab0.zip
docs(nvim): comment
Diffstat (limited to 'plugin')
-rw-r--r--plugin/40-colors.lua14
1 files changed, 2 insertions, 12 deletions
diff --git a/plugin/40-colors.lua b/plugin/40-colors.lua
index ee6ef3f..df2e48c 100644
--- a/plugin/40-colors.lua
+++ b/plugin/40-colors.lua
@@ -87,18 +87,14 @@ local function apply_highlights()
set_cursorline_hl()
end
--- Single owner of every window's highlight namespace: the focused window gets
--- `ns_active`, all others `ns_inactive`. Reapplied to every window on each
--- focus change because WinLeave alone misses windows that existed at startup
--- or were restored from a session.
local function is_normal_win(win)
return vim.api.nvim_win_is_valid(win) and vim.api.nvim_win_get_config(win).relative == ""
end
local function update_focus_ns()
local cur = vim.api.nvim_get_current_win()
- -- Focus in a floating window (completion, hover, ...) must not recolor the
- -- split underneath; leave every window as it is.
+ -- Focus in a floating window (completion, hover, ...) must not recolor the split underneath; leave every window as
+ -- it is.
if not is_normal_win(cur) then
return
end
@@ -109,12 +105,6 @@ local function update_focus_ns()
end
end
--- Note: a closed fold's screen line is always drawn with `Folded` (see
--- `:help fold.txt` / hl-Folded); Neovim has no per-line override, so the
--- unfocused cursor line is not visible when it sits on a closed fold. This is
--- standard behavior (cursorline never renders on closed folds in any window)
--- and is accepted as-is.
-
local function next_colorscheme()
local colorschemes = vim.fn.getcompletion("", "color")
vim.g.colors_name = vim.g.colors_name or "default"