akinsho / toggleterm.nvim

A neovim lua plugin to help easily manage multiple terminal windows
GNU General Public License v3.0
4.21k stars 170 forks source link

[BUG] weird black space at the left of the terminal #527

Closed diegoulloao closed 8 months ago

diegoulloao commented 8 months ago

Is there an existing issue for this?

Current Behavior

I'm seeing a black space at the left of the terminal.

Expected Behavior

Match the same terminal background.

Steps To Reproduce

Environment

- OS: macOs Sonoma 14.2.1
- neovim version: 0.9.4
- Shell: zsh / iterm 3.4.22

Anything else?

Screenshot 4
-- custom setup
toggleterm.setup({
  direction = "float", -- float|horizontal|vertical|tab
  float_opts = {
    border = "curved", -- single|double|curved
    -- winblend = 5, -- transparency, recommended: 5
  },
  size = 20,
  persist_mode = true,
  highlights = {
    Normal = { link = "ToogleTermNormal" },
    NormalFloat = { link = "ToogleTermNormalFloat" },
    FloatBorder = { link = "ToggleTermFloatBorder" },
  },
})

-- highlights
vim.cmd([[ hi ToogleTermNormal guibg=#32302f ]])
vim.cmd([[ hi ToggleTermFloatBorder guibg=#32302f guifg=#32302f ]])
vim.cmd([[ hi ToogleTermNormalFloat guibg=#32302f ]])
akinsho commented 8 months ago

@diegoulloao it appears you've misspelled the highlight groups please have a close look as this might explain the issue. The area seems to be the SignColumn which you can also highlight

diegoulloao commented 8 months ago

Thanks for your reply.

Actually is not. Is happening for other colorschemes too, even when I'm not highlighting any groups on my config.

Screenshot 3
akinsho commented 8 months ago

@diegoulloao so as I mentioned, you have misspelt the names of the highlight groups so they are probably getting assigned incorrectly to something else which makes them appear different to the sign column which you are not trying to highlight, but I've left as it originally is. This is almost certainly a configuration issue rather than a bug in the plugin. I'm sorry but especially given this time of year. I don't really have the time to help you debug this. I strongly recommend you have a close look at the names of the highlight groups cuz they are wrong and try fixing it. Hopefully that fixes it, but otherwise I'm pretty sure that this is not a bug since I tried on different machines and it doesn't reproduce. If you manage to narrow it down to a specific minimal configuration that causes this issue without any extra plugins and no colour scheme influence then please raise the issue again.

diegoulloao commented 8 months ago

@diegoulloao so as I mentioned, you have misspelt the names of the highlight groups so they are probably getting assigned incorrectly to something else which makes them appear different to the sign column which you are not trying to highlight, but I've left as it originally is. This is almost certainly a configuration issue rather than a bug in the plugin. I'm sorry but especially given this time of year. I don't really have the time to help you debug this. I strongly recommend you have a close look at the names of the highlight groups cuz they are wrong and try fixing it. Hopefully that fixes it, but otherwise I'm pretty sure that this is not a bug since I tried on different machines and it doesn't reproduce. If you manage to narrow it down to a specific minimal configuration that causes this issue without any extra plugins and no colour scheme influence then please raise the issue again.

I understand, thanks for your reply.

Just FYI, the problem persist even using the neovim built-in themes with all plugins disabled. No highlighted groups are active. Weird...

Thanks!

Screenshot 3
diegoulloao commented 8 months ago

Ok, I figured out, is the signcolumn = "yes". I'm searching how to disable it just for toggleterm buffers (I'm using gitsigns too).

diegoulloao commented 8 months ago

this worked:

{
  -- config
  on_create = function()
    vim.cmd([[ setlocal signcolumn=no ]])
  end,
}