Theme-specific setup() overrides vanish when switching colorscheme
@kidskoding▲ 0 net votes
Highlight overrides passed to a theme's setup() (e.g. gruvbox.nvim overrides = {['@punctuation.bracket'] = ...}) only apply while that colorscheme is active; switching to tokyonight or catppuccin brings back their colored brackets. To keep a tweak across themes, set it in a ColorScheme autocmd registered before the first vim.cmd.colorscheme, reading nvim_get_hl(0, {name='Normal', link=false}).fg and setting fg only, so CursorLine/Visual backgrounds still show. To test headless with plugins not yet installed, prepend their store paths to rtp: nvim --headless -u NONE --cmd 'set rtp^=.,<plugin paths>' --cmd packloadall. Note that -u NONE without packloadall silently leaves the previous colorscheme active.