folke / tokyonight.nvim

🏙 A clean, dark Neovim theme written in Lua, with support for lsp, treesitter and lots of plugins. Includes additional themes for Kitty, Alacritty, iTerm and Fish.
Apache License 2.0
6.42k stars 433 forks source link

bug: transparency for mini.notify not present. #525

Closed 231tr0n closed 4 months ago

231tr0n commented 6 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

v0.10.0-dev-3117+g4e5c633ed

Operating system/version

Ubuntu 24.04 WSL

Describe the bug

Transparency for mini.notify notifications are not present as they were for nvim-notify.

Steps To Reproduce

Install tokyonight.nvim and mini.notify with any package manager.

require("tokyonight").setup({
    style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
    light_style = "day", -- The theme is used when the background is set to light
    transparent = true,
    terminal_colors = true,
    styles = {
        comments = { italic = true },
        keywords = { italic = true },
        functions = {},
        variables = {},
        sidebars = "transparent",
        floats = "transparent",
    },
    sidebars = { "qf", "help" },
    day_brightness = 0.3,
    hide_inactive_statusline = true,
    dim_inactive = true,
    lualine_bold = false,
})
require("mini.notify").setup({
    window = {
        max_width_share = 0.5,
        -- winblend = 100,
    },
})
vim.notify = MiniNotify.make_notify()

You can see that notifications for mini.notify are not transparent. image

Expected Behavior

image The notification background was expected to be transparent like above but it does not for nvim-notify like below image

Repro

-- DO NOT change the paths and don't remove the colorscheme
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    "folke/tokyonight.nvim",
    "echasnovski/mini.notify",
    -- add any other plugins here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

require("tokyonight").setup({
    style = "night", -- The theme comes in three styles, `storm`, `moon`, a darker variant `night` and `day`
    light_style = "day", -- The theme is used when the background is set to light
    transparent = true,
    terminal_colors = true,
    styles = {
        comments = { italic = true },
        keywords = { italic = true },
        functions = {},
        variables = {},
        sidebars = "transparent",
        floats = "transparent",
    },
    sidebars = { "qf", "help" },
    day_brightness = 0.3,
    hide_inactive_statusline = true,
    dim_inactive = true,
    lualine_bold = false,
})
require("mini.notify").setup({
    window = {
        max_width_share = 0.5,
        winblend = 0,
    },
})
vim.notify = MiniNotify.make_notify()

vim.cmd.colorscheme("tokyonight")
-- add anything else here
echasnovski commented 4 months ago

Setting window.config.winblend = 0 for 'mini.notify' should resolve this.

231tr0n commented 4 months ago

Setting window.config.winblend = 0 for 'mini.notify' should resolve this.

Yes that seems to resolve the issue. Thanks for suggesting it.