toggleterm.nvim
toggleterm.nvim copied to clipboard
[Upstream] WinSeparator/VertSplit cannot be changed locally
I would like to change the winhl of my toggleterm buffer, but it doesn't look to me this is possible now.
@Astrantia you can change the highlights of the terminal by just using the highlights key for each terminal e.g.
highlights = {
Normal = { link = 'NormalFloat' },
},
Since winhighlight is just about adding highlights, then you should be able to achieve whatever you want using those 🤷🏿♂️
Please read the README for more details on how to use it
@Astrantia you can change the highlights of the terminal by just using the highlights key for each terminal e.g.
highlights = { Normal = { link = 'NormalFloat' }, },
Since winhighlight is just about adding highlights, then you should be able to achieve whatever you want using those 🤷🏿♂️
require("toggleterm").setup({
open_mapping = [[<c-\>]],
highlights = {
WinSeparator = { guibg = "#000000", guifg= "#000000" },
VertSplit = { guibg = "#000000", guifg= "#000000" }
},
})
doesn't seem to have any effect, be it with link or hex
@Astrantia you can't set a window local WinSeparator as far as I can tell, I've tried adding one to toggleterm by default, but it doesn't work. You can try this yourself by running setlocal winhighlight=WinSeparator:Visual
inside the toggleterm buffer or whatever buffer you'd like
@Astrantia you can't set a window local WinSeparator as far as I can tell, I've tried adding one to toggleterm by default, but it doesn't work. You can try this yourself by running
setlocal winhighlight=WinSeparator:Visual
inside the toggleterm buffer or whatever buffer you'd like
Is nvim-tree using some different neovim way to present itself? they use WinSeparator over there https://github.com/kyazdani42/nvim-tree.lua/blob/64cc3c17e1a8d00d0fafcb61349b2a7d57234e53/lua/nvim-tree/view.lua#L38 and it seems to work for me too. As for why I'm interested in this is to make the split border disappear. Speaking of which https://user-images.githubusercontent.com/18753533/159889865-724becab-877b-45a2-898e-820afd6a4ee1.mov this gif demo doesn't seem to have that border at all, so I don't understand why it's only me with this white border hanging around above the terminal
also nevermind the WinSeparator, shouldn't VertSplit have had an effect to style the border? (that's the reason i included both winseparator and vertsplit)
@Astrantia you can change the highlights of the terminal by just using the highlights key for each terminal e.g.
highlights = { Normal = { link = 'NormalFloat' }, },
Since winhighlight is just about adding highlights, then you should be able to achieve whatever you want using those 🤷🏿♂️
require("toggleterm").setup({ open_mapping = [[<c-\>]], highlights = { WinSeparator = { guibg = "#000000", guifg= "#000000" }, VertSplit = { guibg = "#000000", guifg= "#000000" } }, })
doesn't seem to have any effect, be it with link or hex
The attached video doesn't work, FYI.
To clarify, in versions of neovim greater than 7.0 which is all that this plugin aims for since I don't support older neovim versions, VertSplit
has been replaced by WinSeparator
. I don't know what behaviour you are seeing in nvim-tree that looks like this is working, but a few very important points to clarify are:
- what direction of toggleterm you are seeing?
- where is the specific highlight you are trying to change?
- what version of neovim you are on
Rather than what other plugins are doing, can you please just try the setlocal winhighlight=WinSeparator:Visual,VertSplit:Visual
command and see if that produces any result for you.
The attached video doesn't work, FYI.
To clarify, in versions of neovim greater than 7.0 which is all that this plugin aims for since I don't support older neovim versions,
VertSplit
has been replaced byWinSeparator
. I don't know what behaviour you are seeing in nvim-tree that looks like this is working, but a few very important points to clarify are:
- what direction of toggleterm you are seeing?
- where is the specific highlight you are trying to change?
- what version of neovim you are on
Rather than what other plugins are doing, can you please just try the
setlocal winhighlight=WinSeparator:Visual,VertSplit:Visual
command and see if that produces any result for you.
the video is one from the readme. i'm using nightly neovim so it should be good on that front.
i'm trying to specifically change the vertsplit for terminal only, and i'm using horizontal split for the terminal (lower half)
doing that setlocal command changes the background color of the terminal, but it doesn't get rid of the white split border.
basically doing :hi VertSplit guibg=#... guifg=#...
achieves the result, but that also covers the highlighting of other splits
this is my neovim now and i want to blend in that white border with the rest of bg colors
@Astrantia as I have already mentioned, this is something that I noticed as soon as WinSeparator
was added. As far as I can tell there is an upstream neovim issue here since as you have already observed if you set WinSeparator
via winhighlight
it doesn't work anyway nor does VertSplit
. Setting it globally like you mention with highlight
(obv) works but is not the desired outcome. This is not a problem that I can fix here.
@Astrantia as I have already mentioned, this is something that I noticed as soon as
WinSeparator
was added. As far as I can tell there is an upstream neovim issue here since as you have already observed if you setWinSeparator
viawinhighlight
it doesn't work anyway nor doesVertSplit
. Setting it globally like you mention withhighlight
(obv) works but is not the desired outcome. This is not a problem that I can fix here.
I guess using a global highlight and winbars as a visual guide for separating buffers is something I can do for now. Feel free to close or keep this issue opened for an upstream reference