Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: noice message view on mini donot follow right colors if tokyonight is transparent #420

Open
3 tasks done
Aneeqasif opened this issue Aug 24, 2023 · 2 comments
Open
3 tasks done
Labels
bug Something isn't working

Comments

@Aneeqasif
Copy link

Did you check docs and existing issues?

  • I have read all the tokyonight.nvim docs
  • I have searched the existing issues of tokyonight.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.9.1

Operating system/version

Arch

Describe the bug

when tokyo night is set to transparent mini in noice do not follow right colors

Steps To Reproduce

set tokyo night theme with following options

{ "folke/tokyonight.nvim",
    -- enabled = false,
    lazy = false,
    priority = 1000,
    opts = {
      transparent = true,
      style = "night",
      styles = {
        -- Style to be applied to different syntax groups
        -- Value is any valid attr-list value for `:help nvim_set_hl`
        comments = { italic = true },
        keywords = { italic = true },
        functions = {},
        variables = {},
        -- Background styles. Can be "dark", "transparent" or "normal"
        sidebars = "dark",   -- style for sidebars, see below
        floats = "dark",     -- style for floating windows
      },
      hide_inactive_statusline = true, -- Enabling this option, will hide inactive statuslines and replace them with a thin border instead. Should work with the standard **StatusLine** and **LuaLine**.
      lualine_bold = false,            -- When `true`, section headers in the lualine theme will be bold
      on_highlights = function(hl, c)
        local prompt = "#1f2336" --#2d3149
        hl.TelescopeNormal = {
          bg = c.bg_dark,
          fg = c.fg_dark,
        }
        hl.TelescopeBorder = {
          bg = c.bg_dark,
          fg = c.bg_dark,
        }
        hl.TelescopePromptNormal = {
          bg = prompt,
        }
        hl.TelescopePromptBorder = {
          bg = prompt,
          fg = prompt,
        }
        hl.TelescopePromptTitle = {
          bg = "#ff9e64",
          fg = c.bg_dark,
        }
        hl.TelescopePreviewTitle = {
          bg = c.bg_dark,
          fg = c.bg_dark,
        }
        hl.TelescopeSelection = {
          bg = "#2D59A1",
          -- fg = c.bg_dark,
        }
        hl.TelescopeSelectionCaret = {
          bg = "#2D59A1",
          fg = "#F7768E",
        }
        hl.TelescopeResultsTitle = {
          bg = c.bg_dark,
          fg = c.bg_dark,
        }
      end,
    },
  }

and noice with

{


  lsp = {
    override = {
      ["vim.lsp.util.convert_input_to_markdown_lines"] = true,
      ["vim.lsp.util.stylize_markdown"] = true,
      ["cmp.entry.get_documentation"] = true,
    },
    hover = {
      enabled = false
    },

    signature = {
      enabled = false
    },
    progress = {
      enabled = false,
    },
  },

  messages = {
    enabled = true,        -- enables the Noice messages UI
    -- view = "notify", -- default view for messages
    view = "mini",         -- default view for messages
    view_error = "notify", -- view for errors
    view_warn = "notify",  -- view for warnings
    view_history = "mini", -- view for :messages
    view_search = "mini",  -- view for search count messages. Set to `false` to disable
    filter = function(msg)
      if msg:match("File .* already opened") then
        return false
      end
      return true
    end
  },
  presets = {
    -- long_message_to_split = false,
    bottom_search = false,        -- use a classic bottom cmdline for search
    command_palette = false,      -- position the cmdline and popupmenu together

    long_message_to_split = true, -- long messages will be sent to a split
    inc_rename = false,           -- enables an input dialog for inc-rename.nvim
  },


  -- cmdline = {
  --   view = "cmdline"
  -- },


  views = {
    cmdline_popup = cmd_style2,

    popupmenu = popupmenu_style2,
    mini = {
      winhighlight = {},
      winblend = 0,
    },
  },

  routes = {
    {
      filter = {
        event = "msg_show",
        kind = "",
        find = "written",
      },
      opts = { skip = true },
      view = "mini"
    },



  },

}

Expected Behavior

image
the mini notification donot follow right colors if transparent=true but are ok when transparent=false

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",
  "folke/tokyonight.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
@Aneeqasif Aneeqasif added the bug Something isn't working label Aug 24, 2023
@mingo99
Copy link

mingo99 commented Nov 3, 2023

Hello, I also encountered the same issue. Have you resolved it?

@mingo99
Copy link

mingo99 commented Nov 28, 2023

You can try this config:

"folke/noice.nvim",
opts = {
    views = {
        mini = { win_options = { winblend = 0 } },
    },
},

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants