-
-
Couldn't load subscription status.
- Fork 311
Description
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
backgroundto"light"in the config file, either before or after runningcolorscheme catppuccin. - Explicitly set
flavour="latte"when loading the catppuccin plugin. - Don't run the
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
NVIM v0.10.2
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260Terminal and multiplexer
GNOME terminal 3.54.2
Catppuccin version / branch / rev
Steps to reproduce
- Make sure terminal uses a light background so that nvim starts with
backgroundset 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
