Black box on term buffer due to NvimTree
Opened this issue · 11 comments
Description
The problem is explained in this github discussion
Neovim version
NVIM v0.11.0-dev-1861+g1e4c708033-Homebrew
Build type: Release
LuaJIT 2.1.1736781742
Run "nvim -V1 -v" for more info
Operating system and version
Macos arm
Windows variant
No response
nvim-tree version
Clean room replication
nvim -nu /tmp/nvim-tmp.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
end
-- UNCOMMENT this block for diagnostics issues, substituting pattern and cmd as appropriate.
-- Requires diagnostics.enable = true in setup.
--[[
vim.api.nvim_create_autocmd("FileType", {
pattern = "lua",
callback = function()
vim.lsp.start { cmd = { "lua-language-server" } }
end,
})
]]
Steps to reproduce
nvim -nu
15sp|term
ls -la
<C-\><C-N> to get back to normal mode
<C-w>o
You will see the blackbox
Expected behavior
The black box is not rendered
Actual behavior

I cannot replicate this with kitty on linux however that is not surprising.
Unfortunately I don't have access to macos; could you give this a try @gegoune ?
FYI terminal return to normal default is <C-\><C-N> (I'm a terminal newbie)
Does this occur with any other terminals @jugarpeupv ?
@alex-courtis Yes, this is iterm
And this is alacritty
And i also reproduced it with a minimal config
Minimal config:
nvim -nu /tmp/nvim-tmp.lua
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvt-min/site]]
local package_root = "/tmp/nvt-min/site/pack"
local install_path = package_root .. "/packer/start/packer.nvim"
local function load_plugins()
require("packer").startup {
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config = {
package_root = package_root,
compile_path = install_path .. "/plugin/packer_compiled.lua",
display = { non_interactive = true },
},
}
end
if vim.fn.isdirectory(install_path) == 0 then
print "Installing nvim-tree and dependencies."
vim.fn.system { "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path }
end
load_plugins()
require("packer").sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]]
vim.opt.termguicolors = true
vim.opt.cursorline = true
-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
_G.setup = function()
require("nvim-tree").setup {}
end
-- UNCOMMENT this block for diagnostics issues, substituting pattern and cmd as appropriate.
-- Requires diagnostics.enable = true in setup.
--[[
vim.api.nvim_create_autocmd("FileType", {
pattern = "lua",
callback = function()
vim.lsp.start { cmd = { "lua-language-server" } }
end,
})
]]
Can't replicate with iterm2.
Must be something else in your configuration. Try without shell and terminal configurations.
Okey i will try and let you know, thank you @gegoune
@gegoune i have tried using bash instead of zsh, removing all env variables, changing $TERM. But still reproducing it with iterm, kitty and alacritty
Only if i use default Terminal.app i do not reproduce it, with Terminal.app using my default zsh or bash config, it works well with both, with the minimal example i provided and with my neovim config
I have no idea what could be, what i have noticed is with Terminal.app if i open neovim with or without my personal config, the colors are missing, but i dont know why

Can you reproduce it without ls -la step?
It doesn't look like provided screenshots are from minimal reproduction configuration.
Also:
- make sure
lsis not aliased just in case - try different directory
- try with configuration as per your original post

