toggleterm.nvim
toggleterm.nvim copied to clipboard
Shade floating terminal
Hi, thanks for the cool plugin! Simple and adds a lot imo.
I am not sure if this is a limitation that is caused by neovim, but would it be possible to add shading_factor = <VALUE>
to the floating terminal (float_opts
)? It seems like it is using the normal background color.
Hi @Alex-vZyl so the floating windows aren't shaded on purpose. Most people use them for things lazygit or top or terminal file managers. So shading would probably be disruptive in those circumstances, at least that has been my reasoning. It's possible to add, but to be completely honest I'm not particularly interested in adding this myself. Feel free to raise a PR if you're interested in making this happen though
I understand that. I am relatively new to neovim plugins, but I will give it a shot.
The terminal shading is added here
https://github.com/akinsho/toggleterm.nvim/blob/9db6f98af4f700945cff0f4f34b92ec80ab67a2b/lua/toggleterm/config.lua#L92
what I would suggest is that you implement this using shade_filetypes
by allowing a new item to be added which is called float
(not quite a filetype, that option needs to be renamed) and then you can check the conf.shade_filetypes
in config.lua
just above where I linked and if it includes float
then similar to the other highlights you can add FloatNormal
and FloatBorder
to the overrides.
I think that should work.
Going to close this out since I personally don't plan to do this, also a user can manually add a highlight for a float so this effect already be achieved