Description
When using a light-background terminal so that neovim automatically sets background to "light", some syntax highlighting doesn't work properly. In particular I've found that HTML bold and italic (this includes Markdown as well) don't get applied. I've reproduced this both with lazy.nvim (included repro.lua) as well as mini.deps, both with no other plugins or configuration beyond setting up the plugin manager, loading the plugin, and setting the colorscheme.
I've found three workarounds:
- Explicitly set
background to "light" in the config file, either before or after running colorscheme catppuccin.
- Explicitly set
flavour="latte" when loading the catppuccin plugin.
- Don't run the
colorscheme command from an config file; instead let the default colorscheme load and then set the colorscheme manually once the buffer is opened. (I guess an autocmd could do this.)
If I don't apply any of the workarounds and then try to change the colorscheme to another theme, or change background, the issue persists, even with colorschemes where this issue doesn't normally occur (including the other (dark) catppuccin flavours). The only way I've found to fix it is to quit nvim and apply one of the workarounds as above.
This problem doesn't seem to affect the other theme I tested, Rosé Pine.
Neovim version
NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260
Terminal and multiplexer
GNOME terminal 3.54.2
Catppuccin version / branch / rev
faf15ab
Steps to reproduce
- Make sure terminal uses a light background so that nvim starts with
background set to "light".
nvim -u repro.lua
Expected behavior

Actual behavior

Repro
-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"catppuccin/nvim",
-- add any other plugins here
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
})
vim.cmd.colorscheme("catppuccin")
-- add anything else here
Description
When using a light-background terminal so that neovim automatically sets
backgroundto"light", some syntax highlighting doesn't work properly. In particular I've found that HTML bold and italic (this includes Markdown as well) don't get applied. I've reproduced this both with lazy.nvim (includedrepro.lua) as well as mini.deps, both with no other plugins or configuration beyond setting up the plugin manager, loading the plugin, and setting the colorscheme.I've found three workarounds:
backgroundto"light"in the config file, either before or after runningcolorscheme catppuccin.flavour="latte"when loading the catppuccin plugin.colorschemecommand from an config file; instead let the default colorscheme load and then set the colorscheme manually once the buffer is opened. (I guess anautocmdcould do this.)If I don't apply any of the workarounds and then try to change the colorscheme to another theme, or change
background, the issue persists, even with colorschemes where this issue doesn't normally occur (including the other (dark) catppuccin flavours). The only way I've found to fix it is to quit nvim and apply one of the workarounds as above.This problem doesn't seem to affect the other theme I tested, Rosé Pine.
Neovim version
Terminal and multiplexer
GNOME terminal 3.54.2
Catppuccin version / branch / rev
faf15ab
Steps to reproduce
backgroundset to"light".nvim -u repro.luaExpected behavior
Actual behavior
Repro