Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gegoune opened this issue Nov 28, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@gegoune
Copy link

gegoune commented Nov 28, 2024

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!")
@gegoune gegoune added the bug Something isn't working label Nov 28, 2024
@gegoune
Copy link
Author

gegoune commented Dec 3, 2024

Actually, not sure if that's Diffview's issue at all since explicitly setting default colorscheme, like so vim.cmd.colorscheme("default"), 'fixes' 'the issue'. Will keep it open for the time being until maintainers can review it.

I think somewhat related discussion takes place here: neovim/neovim#30048

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant