xiyaowong / transparent.nvim

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

How to set the background transparent of neo-tree and lualine #36

Closed yuWorm closed 1 year ago

yuWorm commented 1 year ago

If you use this plug-in, everything else is transparent, but neo-tree and lualine cannot be transparent. I saw that your demo seems to use neo-tree, so I would like to ask how you set it up.

xiyaowong commented 1 year ago

You should find their highlights, such as NeotreeNormal, NeotreeNormalNC...

jrock2004 commented 1 year ago

@yuWorm did you ever figure this out?

TimDiekmann commented 1 year ago

For NeoTree this works for me:

            extra_groups = {
                "NeoTreeCursorLine",
                "NeoTreeDimText",
                "NeoTreeDirectoryIcon",
                "NeoTreeDirectoryName",
                "NeoTreeDotfile",
                "NeoTreeFileIcon",
                "NeoTreeFileName",
                "NeoTreeFileNameOpene",
                "NeoTreeFilterTerm",
                "NeoTreeFloatBorder",
                "NeoTreeFloatTitle",
                "NeoTreeTitleBar",
                "NeoTreeGitAdded",
                "NeoTreeGitConflict",
                "NeoTreeGitDeleted",
                "NeoTreeGitIgnored",
                "NeoTreeGitModified",
                "NeoTreeGitUnstaged",
                "NeoTreeGitUntracke",
                "NeoTreeGitStaged",
                "NeoTreeHiddenByName",
                "NeoTreeIndentMarker",
                "NeoTreeExpander",
                "NeoTreeNormal",
                "NeoTreeNormalNC",
                "NeoTreeSignColumn",
                "NeoTreeStatusLine",
                "NeoTreeStatusLineNC",
                "NeoTreeVertSplit",
                "NeoTreeWinSeparator",
                "NeoTreeEndOfBuffer",
                "NeoTreeRootName",
                "NeoTreeSymbolicLinkTarget",
                "NeoTreeTitleBar",
                "NeoTreeWindowsHidden",
            },
NeoPrint3D commented 1 year ago

What does the rest of the file look like I'm pretty new to neovim I can't get anything to be transparent besides the background

jrock2004 commented 1 year ago

@NeoPrint3D I copied above and it worked just fine for me

leoriohub commented 12 months ago

has anyone found the correct groups for lualine?

niksingh710 commented 11 months ago

has anyone found the correct groups for lualine?

looking for same.

rn the workaoround m using is

local theme = function()
    local colors = {
        darkgray = "#16161d",
        gray = "#727169",
        innerbg = nil,
        outerbg = "#16161D",
        normal = "#7e9cd8",
        insert = "#98bb6c",
        visual = "#ffa066",
        replace = "#e46876",
        command = "#e6c384",
    }
    return {
        inactive = {
            a = { fg = colors.gray, bg = colors.outerbg, gui = "bold" },
            b = { fg = colors.gray, bg = colors.outerbg },
            c = { fg = colors.gray, bg = colors.innerbg },
        },
        visual = {
            a = { fg = colors.darkgray, bg = colors.visual, gui = "bold" },
            b = { fg = colors.gray, bg = colors.outerbg },
            c = { fg = colors.gray, bg = colors.innerbg },
        },
        replace = {
            a = { fg = colors.darkgray, bg = colors.replace, gui = "bold" },
            b = { fg = colors.gray, bg = colors.outerbg },
            c = { fg = colors.gray, bg = colors.innerbg },
        },
        normal = {
            a = { fg = colors.darkgray, bg = colors.normal, gui = "bold" },
            b = { fg = colors.gray, bg = colors.outerbg },
            c = { fg = colors.gray, bg = colors.innerbg },
        },
        insert = {
            a = { fg = colors.darkgray, bg = colors.insert, gui = "bold" },
            b = { fg = colors.gray, bg = colors.outerbg },
            c = { fg = colors.gray, bg = colors.innerbg },
        },
        command = {
            a = { fg = colors.darkgray, bg = colors.command, gui = "bold" },
            b = { fg = colors.gray, bg = colors.outerbg },
            c = { fg = colors.gray, bg = colors.innerbg },
        },
    }
end```

then setting theme in lualine opts
```lua
require("lualine").setup({
    options = {
        theme = theme,
    }
})
xiyaowong commented 11 months ago

@niksingh710 You can use clear_prefxi for now. Please see readme for details:)

niksingh710 commented 11 months ago

@niksingh710 You can use clear_prefxi for now. Please see readme for details:)

works like charm