1 Commits
Author SHA1 Message Date
Jorge ManrubiaandGitHub 3da14f892f Fix nvim transparency to preserve foreground colors (#4844)
* Fix nvim transparency to preserve foreground colors

The old approach used `vim.api.nvim_set_hl(0, name, { bg = "none" })`
which replaces the entire highlight definition, wiping out foreground
and other attributes. This breaks snacks.nvim's GitHub integration
(gh_pr/gh_issue pickers) which reads the foreground color from Normal
and NormalFloat at module load time, gets nil, and crashes in
Snacks.util.blend().

The fix uses nvim_get_hl to fetch existing attributes first, removes
only bg, then sets the highlight back — preserving all other attributes.

* Drop fallback that reintroduces the highlight-wiping bug

If nvim_get_hl fails for a group, skip it rather than falling back to
the old { bg = "none" } approach that clears all attributes.
2026-03-07 19:46:17 +01:00