Skip to content

[Bug] Filenames in DiffviewFiles panel are invisible with default Neovim light theme #543

@gegoune

Description

@gegoune

Description

When using default Neovim colorscheme with background=light files and directories on list panel are invisible, blending into the background, except for one that's currently under cursorline.

Also colour of help indicator and counters are hard to read.

Expected behavior

Filenames and directories to be visible, just like with background=dark.

Actual behavior

Screenshot 2024-11-28 at 09 32 07 Screenshot 2024-11-28 at 09 32 31

Steps to reproduce

  1. git init
  2. echo test > test
  3. nvim --clean -u mini.lua
  4. (optional, depending on terminal settings) :set background=light

Health check

Output of :checkhealth diffview
diffview:                                   require("diffview.health").check()

Checking plugin dependencies
- OK nvim-web-devicons installed.

Checking VCS tools
- The plugin requires at least one of the supported VCS tools to be valid.
- OK Git found.
- OK Git is up-to-date. (2.47.1)
- WARNING Configured hg_cmd is not executable: 'hg'

Log info

Relevant info from :DiffviewLog
[ERROR 2024-11-28 xx:34:36.171 Xxx00] ...gins/diffview.nvim/lua/diffview/vcs/adapters/hg/init.lua:53: [HgAdapter] Configured `hg_cmd` is not executable: 'hg'

Neovim version

NVIM v0.11.0-dev-1247+g5897994cb7
Build type: RelWithDebInfo
LuaJIT 2.1.1731601260

The same can be observed with:

NVIM v0.10.2
Build type: Release
LuaJIT 2.1.1731601260

Operating system and version

Darwin 24.1.0 arm64 Darwin

Minimal config

local root = vim.fn.stdpath("run") .. "/nvim/diffview.nvim"
local plugin_dir = root .. "/plugins"
vim.fn.mkdir(plugin_dir, "p")

for _, name in ipairs({ "config", "data", "state", "cache" }) do
  vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

local plugins = {
  { "nvim-web-devicons", url = "https://github.com/nvim-tree/nvim-web-devicons.git" },
  { "diffview.nvim", url = "https://github.com/sindrets/diffview.nvim.git" },
}

for _, spec in ipairs(plugins) do
  local install_path = plugin_dir .. "/" .. spec[1]
  if vim.fn.isdirectory(install_path) ~= 1 then
    if spec.url then
      print(string.format("Installing '%s'...", spec[1]))
      vim.fn.system({ "git", "clone", "--depth=1", spec.url, install_path })
    end
  end
  vim.opt.runtimepath:append(spec.path or install_path)
end

require("diffview").setup({})

vim.opt.termguicolors = true
-- vim.cmd("colorscheme " .. (vim.fn.has("nvim-0.8") == 1 and "habamax" or "slate"))

print("Ready!")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions