xiyaowong / transparent.nvim

Remove all background colors to make nvim transparent
806 stars 23 forks source link

somehow this conflicts with noice.nvim #53

Closed niksingh710 closed 3 months ago

niksingh710 commented 11 months ago

If this plugin is enabled in noice.nvim "\" and "\" will not work

xiyaowong commented 11 months ago

Perhaps the highlight has been cleared, it's actually effective, but you just can't see it.

niksingh710 commented 11 months ago

Perhaps the highlight has been cleared, it's actually effective, but you just can't see it.

i didn't get what you meant?

xiyaowong commented 11 months ago

I don't use noice.nvim. Can you provide a screen recording?

niksingh710 commented 11 months ago

I don't use noice.nvim. Can you provide a screen recording?

not my recording but this is what m exactly facing. https://github.com/folke/noice.nvim/issues/492#issue-1733806953

xiyaowong commented 11 months ago

I can't even understand what's wrong with that recording

niksingh710 commented 11 months ago

I can't even understand what's wrong with that recording

That tab part when he presses tab to go forward in the list it just stucks there and cycles.

xiyaowong commented 11 months ago

Works fine for me.

image

xiyaowong commented 11 months ago

This plugin only removes the background in highlighting group, it will not have any side effects

niksingh710 commented 11 months ago

With Plugin

With Plugin

Without Plugin

Without Plugin

As you can notice with the plugin it stucks between only the two selection on tab completion. here is the config

return {
    "xiyaowong/transparent.nvim",
  lazy = false,
    opts = {
        extra_groups = {
            "NormalFloat", -- plugins which have float panel such as Lazy, Mason, LspInfo
            "NvimTreeNormal", -- NvimTree
        },
        lualine_style = "default",
        -- lualine_style = "stealth",
    },
    config = function()
        local transparent = require("transparent")
        transparent.clear_prefix("lualine")
        transparent.clear_prefix("Bufferline")
    if config.transparent then
      vim.cmd("TransparentEnable")
    end
    end,
}
nickitat commented 8 months ago

I had the same problem. apparently it only happens when I use clear_prefix feature. what I did is just found out what groups it clears by adding these lines in (lua/transparent/init.lua):

function M.clear_prefix(prefix)
    if not prefix or prefix == "" then
        return
    end
    if not vim.tbl_contains(group_prefix_list, prefix) then
        table.insert(group_prefix_list, prefix)
    end
    local x = vim.fn.getcompletion(prefix, "highlight")
    lu = require("luaunit")
    print(lu.prettystr(x))
    clear_group(x)
end

and explicitly pasting all of them in extra_groups.