nvim-origami icon indicating copy to clipboard operation
nvim-origami copied to clipboard

Non-uniform background color

Open galou opened this issue 3 months ago • 6 comments

Make sure you have done the following

  • [x] I have updated to the latest version of the plugin.
  • [x] I have read the README.
  • [x] I have searched the existing issues for this plugin.

Bug Description

Probably not a bug. More a question.

How do I achieve a uniform background color on folded lines?

Relevant Screenshot

My folded lines look like this:

Image

To Reproduce

No response

neovim version

NVIM v0.10.0-dev-2133+gb5653984e
Build type: RelWithDebInfo
LuaJIT 2.1.1703358377

galou avatar Sep 30 '25 08:09 galou

One possible reason is you are running an outdated version of nvim, which potentially does not support newer highlighting features (not sure, I do not know which version of nvim introduced what.)

Another is that your theme does not style folded lines correctly. With most popular colorschemes like tokyonight, the background should look correct.

chrisgrieser avatar Sep 30 '25 11:09 chrisgrieser

My version of Neovim is probably recent enough because the background is uniform with the default theme. It is also uniform without origami.

What could be the culprit is that I may have another plugin that manages folds. I'll need to dig deeper into my config.

galou avatar Oct 01 '25 10:10 galou

My version of Neovim is probably recent enough because the background is uniform with the default theme. It is also uniform without origami.

The background looks fine for me with the default theme as well.

When origami defines the hlgroups for the foldtext, it uses an instruction to combine highlights groups with the existing ones. And it might be that nvim API for that is not available yet in nvim 0.10.

What could be the culprit is that I may have another plugin that manages folds. I'll need to dig deeper into my config.

yeah, best to try a minimal config with just nvim origami, on nvim 0.11, and the default theme. if it still does not work then, you can share such that config and I can have a look what might cause the issue.

chrisgrieser avatar Oct 01 '25 11:10 chrisgrieser

@galou you should look at the Folded highlight group.

:hi Folded guibg=none

OXY2DEV avatar Oct 20 '25 08:10 OXY2DEV

@OXY2DEV thanks a lot! It helped me making the contrast not so visible but the background is still not uniform (I cannot debug the highlight style where the background color is not the one of Folded because I cannot send the cursor to this position).

galou avatar Oct 20 '25 10:10 galou

@galou

please try a minimal config like this on the latest public release of nvim (0.11.4)

-- save as `minimal-config.lua`
-- run via: `nvim -u minimal-config.lua`
--------------------------------------------------------------------------------
local spec = {
	"chrisgrieser/nvim-origami",
	opts = {},
}

--------------------------------------------------------------------------------
vim.env.LAZY_STDPATH = "/tmp/nvim-repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro { spec = spec }

chrisgrieser avatar Oct 20 '25 11:10 chrisgrieser