Skip to content

[BUG] Issues with color contrast confusion #403

Description

@NullSense

System Setup

 nvim -V1 -v
NVIM v0.11.1
Build type: RelWithDebInfo
LuaJIT 2.1.1748459687
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions     -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security     -fstack-clash-protection -fcf-protection     -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/neovim/src=/usr/src/debug/neovim -flto=auto -O2 -g -flto=auto -fno-fat-lto-objects -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wvla -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -fsigned-char -fstack-protector-strong -Wno-conversion -fno-common -Wno-unused-result -Wimplicit-fallthrough -fdiagnostics-color=always  -DUNIT_TESTING -D_GNU_SOURCE -DINCLUDE_GENERATED_DECLARATIONS -DUTF8PROC_STATIC -I/usr/include/luajit-2.1 -I/usr/include -I/build/neovim/src/neovim/build/src/nvim/auto -I/build/neovim/src/neovim/build/include -I/build/neovim/src/neovim/build/cmake.config -I/build/neovim/src/neovim/src

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"

Describe the bug

Hello,

I am in the weeds of configuring my neovim and I'm confused with a few things. I wasn't sure where to post this, as it relates to multiple plugins, and default neovim, so I thought it would be prudent to post here.

I know this is quite contrived, but this wide array of issues probably points to my configuration having underlying base issues, I hope someone can help me understand better how to correctly fix this. Thank you in advance.

Expected behaviour

  • The trouble menu should have highlighting for the current line (currently the background is the same color).
  • Mini.icons should be set up correctly (I'm not sure if I should manually override or if this should automatically happen with mini.icons installation)
  • What's weird is that lualine icons seem to work correctly out of the box without overriding.
  • The icon selection should be consistent (everything should use mini.icons)

My config (lazy.nvim)

{
	"ellisonleao/gruvbox.nvim",
	priority = 1000,
	config = function()
		require("gruvbox").setup()
		vim.cmd([[colorscheme gruvbox]])
	end,
},
{
	"echasnovski/mini.icons",
	lazy = false,
	config = function()
		require("mini.icons").setup()
		MiniIcons.mock_nvim_web_devicons()
	end,
},
{
	"nvim-lualine/lualine.nvim",
	dependencies = { "echasnovski/mini.icons" },
	config = function()
		require("lualine").setup({
			options = {
				theme = "gruvbox",
				icons_enabled = true,
			},
			sections = {
				lualine_a = {
					{
						"mode",
						fmt = function(str)
							return str:sub(1, 1)
						end,
					},
				},
				lualine_b = {
					{
						"branch",
						fmt = function(str)
							return str:sub(1, 7)
						end,
					},
					"diff",
					"diagnostics",
				},
				lualine_c = { "filename" },
				lualine_x = { "filetype" },
				lualine_y = { "progress" },
				lualine_z = { "location" },
			},
			inactive_sections = {
				lualine_c = { "filename" },
				lualine_x = { "location" },
			},
			tabline = {
				lualine_a = {
					{
						"buffers",
						show_filename_only = true, -- Shows shortened relative path when set to false.
						show_modified_status = true, -- Shows indicator when the buffer is modified.
					},
				},
			},
		})
	end,
},

Screenshots

  1. As you can see, in my trouble.nvim bottom buffer I don't have any highlighting happening over line 39, even though I'm hovered over it. I verified that this works with the default theme.
  2. Another issue is on the left WARN and ERROR diagnostic there's a contrast between the icon background and the regular vertical bar background.
  3. I wasn't sure how to correctly set up the vim.diagnostic icons correctly with mini.icons.
  4. I'm also using tiny-inline-diagnostic.nvim which seems to duplicate errors. It also seems to use its own icons (the red and yellow circles).

Image

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions