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: Black/White background color on interactive windows since neovim v0.10 #1480

Closed
3 tasks done
Nukesor opened this issue May 20, 2024 · 6 comments
Closed
3 tasks done
Labels
bug Something isn't working

Comments

@Nukesor
Copy link

Nukesor commented May 20, 2024

Did you check docs and existing issues?

  • I have read all the docs.
  • I have searched the existing issues.
  • I have searched the existing discussions.

Neovim Version (nvim -v)

0.10.0-2

Operating System / Version

ArchLinux 6.8.9-arch1-2

Describe the Bug

All hover windows (rename, move, etc) have a pure black/white background, based on the colorscheme's style(dark/light). This started to occur with the update to neovim 0.10. I also tested several color schemes, including neovim's default scheme and it appears on all of them.

I experience the same behavior for hover windows of lspsaga and lazy's hover window. skim hover windows however seem to work just fine.

Things I tried

  • Checked different terminals (xterm and alacritty) , but it appears on both terminals.
  • Unset all environment variables from my environment (except $HOME). Didn't do anything. As soon as settermguicolors is activated, the behavior appears.
  • Minimal reproducable setup, which can be seen below.
  • Switch back to v0.9, whichfixes the problem. The behavior only occurs on v0.10.

Workaround

Setting set :notermguicolors fixes the problem! It just looks bad.

Similar issues

I stumbled upon this neovim issue, but it seems to be a different problem, even though it sound suspiciously similar. Their minimal config works perfectly fine on my system and the transparent windows is displayed correctly.

Screenshots, Traceback

image

Trace log of the event:

[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_win_closed  with args:  {
  afile = "1006"
}
[DEBUG Mon 20 May 2024 03:15:34 AM CEST] ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/setup/init.lua:731: VIM_WIN_CLOSED: disposing state for window 1006
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_win_closed",
  handler = <function 1>
}  for vim_win_closed called successfully.
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_tab_closed  with args:  {
  afile = "2"
}
[DEBUG Mon 20 May 2024 03:15:34 AM CEST] ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/setup/init.lua:718: VIM_TAB_CLOSED: disposing state for tabnr 2
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_tab_closed",
  handler = <function 1>
}  for vim_tab_closed called successfully.
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_win_enter  with args:  {
  afile = "neo-tree filesystem [1]"
}
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  neo-tree-win-enter  for vim_win_enter called successfully.
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_buffer_enter  with args:  {
  afile = "neo-tree filesystem [1]"
}
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  neo_tree_buffer_enter  with args:  nil
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_buffer_enter",
  handler = <function 1>
}  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.vim_buffer_enter  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:34 AM CEST] ...nvim/lazy/neo-tree.nvim/lua/neo-tree/sources/manager.lua:402: buffers  disposing of tab:  3 buffers
[DEBUG Mon 20 May 2024 03:15:34 AM CEST] ...ree.nvim/lua/neo-tree/sources/filesystem/lib/fs_scan.lua:655: Not unwatching folders... use_libuv_file_watcher is  nil  and state.tree is  false
[DEBUG Mon 20 May 2024 03:15:34 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:116: Closing window, but saving position first.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ....nvim/lua/neo-tree/sources/filesystem/lib/fs_actions.lua:174: Moving node:  /home/nuke/temp/bewerbung.md  to  nil , using root directory:  /home/nuke/temp
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_buffer_enter  with args:  {
  afile = ""
}
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  neo_tree_popup_buffer_enter  with args:  nil
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_buffer_enter",
  handler = <function 1>
}  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.vim_buffer_enter  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_buffer_modified_set  with args:  {
  afile = ""
}
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:67: Seed for vim_buffer_modified_set returned: table: 0x788547a3cdf8
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.vim_buffer_modified_set  for vim_buffer_modified_set called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  git_status.vim_buffer_modified_set  for vim_buffer_modified_set called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:692: Redrawing tree filesystem 1
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1134: render_tree: Saving position
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:653: Saved cursor position with lnum: 6
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:654: Saved window position with topline: 1
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  6  actual width:  37
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  10  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  97  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  113  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  125  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  12  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  9  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  4  actual width:  35
[TRACE Mon 20 May 2024 03:15:35 AM CEST] .../neo-tree.nvim/lua/neo-tree/sources/common/container.lua:309: wanted width:  13  actual width:  35
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:1161: render_tree: Restoring position
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:674: Restoring window position to topline: 1
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:675: Restoring cursor position to lnum: 6
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:664: Forget about cursor position.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...are/nvim/lazy/neo-tree.nvim/lua/neo-tree/ui/renderer.lua:698:   Redrawing tree done filesystem 1
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  filesystem.vim_buffer_modified_set  for vim_buffer_modified_set called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  neo_tree_popup_input_ready  with args:  {
  bufnr = 8,
  winid = 1008
}
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_win_closed  with args:  {
  afile = "1007"
}
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/setup/init.lua:731: VIM_WIN_CLOSED: disposing state for window 1007
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_win_closed",
  handler = <function 1>
}  for vim_win_closed called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_win_closed  with args:  {
  afile = "1008"
}
[DEBUG Mon 20 May 2024 03:15:35 AM CEST] ...hare/nvim/lazy/neo-tree.nvim/lua/neo-tree/setup/init.lua:731: VIM_WIN_CLOSED: disposing state for window 1008
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_win_closed",
  handler = <function 1>
}  for vim_win_closed called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_win_enter  with args:  {
  afile = "neo-tree filesystem [1]"
}
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  neo-tree-win-enter  for vim_win_enter called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_buffer_enter  with args:  {
  afile = "neo-tree filesystem [1]"
}
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  neo_tree_buffer_enter  with args:  nil
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_buffer_enter",
  handler = <function 1>
}  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:35 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.vim_buffer_enter  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_win_enter  with args:  {
  afile = "neo-tree filesystem [1]"
}
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  neo-tree-win-enter  for vim_win_enter called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_buffer_enter  with args:  {
  afile = "/home/nuke/.local/share/nvim/neo-tree.nvim.log"
}
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  neo_tree_buffer_leave  with args:  nil
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_buffer_enter",
  handler = <function 1>
}  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.vim_buffer_enter  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  vim_buffer_enter  with args:  {
  afile = "/home/nuke/.local/share/nvim/neo-tree.nvim.log"
}
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  {
  event = "vim_buffer_enter",
  handler = <function 1>
}  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.vim_buffer_enter  for vim_buffer_enter called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:97: Firing event:  state_created  with args:  {
  bind_to_cwd = true,
  commands = {
    add = <function 1>,
    add_directory = <function 2>,
    buffer_delete = <function 3>,
    cancel = <function 4>,
    close_all_nodes = <function 5>,
    close_all_subnodes = <function 6>,
    close_node = <function 7>,
    close_window = <function 8>,
   ...
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  buffers.state_created  for state_created called successfully.
[TRACE Mon 20 May 2024 03:15:40 AM CEST] ...re/nvim/lazy/neo-tree.nvim/lua/neo-tree/events/queue.lua:81: Handler  git_status.state_created  for state_created called successfully.

Steps to Reproduce

  1. Run neovim with nimimal reproducable config.
  2. Press m on neo-tree to open move menu.

Expected Behavior

The background shouldn't switch to black/white.

Your Configuration

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable", -- latest stable release
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    ----- Libraries -----
    "MunifTanjim/nui.nvim",
    "nvim-lua/plenary.nvim",
    "nvim-neo-tree/neo-tree.nvim",
})

vim.cmd(":Neotree source=filesystem")
@Nukesor Nukesor added the bug Something isn't working label May 20, 2024
@Nukesor Nukesor changed the title BUG: BUG: Black background color on hover windows May 20, 2024
@Nukesor Nukesor changed the title BUG: Black background color on hover windows BUG: Black/White background color on hover windows since neovim v0.10 May 20, 2024
@Nukesor
Copy link
Author

Nukesor commented May 20, 2024

I played around a bit more and found out that the issue doesn't happen on the habamax colorscheme doesn't appear to have this issue. The original vim colorscheme also seems to look fine (even though the colors are extreme).

habamax:
image

vim:
image

What's confusing though is that the default neovim colorscheme has this problem as well as the other three colorschemes I tested. So I assume this is an issue introduced with the new colorscheme?

default:
image

@rishyramen
Copy link

I am also experiencing a similar issue. I observe the black background on the status lines of inactive windows and inside the Lazy UI. I'm not certain if it was the cause but I started noticing the behavior after installing lualine and setting cmdheight=0 but reverting these actions didn't fix it.

@Nukesor
Copy link
Author

Nukesor commented May 23, 2024

Same thing here. The Lazy UI is affected as well, including the top bar.

What's interesting is that the Lazy UI uses and sets the habamax colorscheme by default every time it starts up. This seems to break something for the top line, which otherwise works perfectly fine for me.

@Nukesor Nukesor changed the title BUG: Black/White background color on hover windows since neovim v0.10 BUG: Black/White background color on interactive windows since neovim v0.10 May 23, 2024
@miversen33
Copy link
Collaborator

Just popping in here to confirm that I can recreate your issue with the provided config.

What's interesting is if you add literally any valid value for popup_border_style, it corrects the issue

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "https://github.com/folke/lazy.nvim.git",
        "--branch=stable", -- latest stable release
        lazypath,
    })
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
    {
        "nvim-neo-tree/neo-tree.nvim",
        dependencies = {
            "nvim-lua/plenary.nvim",
            "MunifTanjim/nui.nvim",
        },
        branch = "main",
        config = {
            popup_border_style = "single",
        }
    },
})

vim.cmd(":Neotree source=filesystem")

Valid values for popup_border_style can be found in :h api-win-config under the config.border section

border:       Style of (optional) window border. This can either
                    be a string or an array. The string values are
                    • "none": No border (default).
                    • "single": A single line box.
                    • "double": A double line box.
                    • "rounded": Like "single", but with rounded corners
                      ("╭" etc.).
                    • "solid": Adds padding by a single whitespace cell.
                    • "shadow": A drop shadow effect by blending with the
                      background.
                    • If it is an array, it should have a length of eight or
                      any divisor of eight. The array will specify the eight
                      chars building up the border in a clockwise fashion
                      starting with the top-left corner. As an example, the
                      double box style could be specified as: 
                      [ "╔", "═" ,"╗", "║", "╝", "═", "╚", "║" ].

                      If the number of chars are less than eight, they will be
                      repeated. Thus an ASCII border could be specified as 
                      [ "/", "-", \"\\\\\", "|" ],

                      or all chars the same as 
                      [ "x" ].

                    An empty string can be used to turn off a specific border,
                    for instance, 
                     [ "", "", "", ">", "", "", "", "<" ]

                    will only make vertical borders but not horizontal ones.
                    By default, `FloatBorder` highlight is used, which links
                    to `WinSeparator` when not defined. It could also be
                    specified by character: 
                     [ ["+", "MyCorner"], ["x", "MyBorder"] ].

Not really sure what is going on but this workaround seems to work for me.

Without setting popup_border_style
image

With setting popup_border_style to something (single) in my case
image

IIRC Neo-tree uses nui for the popup handling, might be a nui regression?

@rishyramen
Copy link

Sorry, I realized my issue was unrelated (I don't use neo-tree). If it helps the behavior I observed was due to enabling transparent floating windows with my theme (kanagawa-dragon) but I accidentally copied over an override for the LazyNormal highlight group which caused the Lazy floating window to have a black background.

@Nukesor
Copy link
Author

Nukesor commented May 29, 2024

I'm at this point very sure that this has to do with old color schemes.

The ported lua variant of gruvbox works just fine, so I'll guess I'll close this for now.

@Nukesor Nukesor closed this as completed May 29, 2024
@Nukesor Nukesor reopened this May 29, 2024
@Nukesor Nukesor closed this as completed May 29, 2024
nnmchang added a commit to nnmchang/dotfiles that referenced this issue Jun 1, 2024
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

3 participants