darkvoid-theme / darkvoid.nvim

Neovim Colorscheme for dark dwellers with optional glow effect!
MIT License
144 stars 9 forks source link

Lualine sometimes responsive, sometimes not #18

Open AndreiMoraru123 opened 5 days ago

AndreiMoraru123 commented 5 days ago

Hi! On some vim openings the theme's lualine seems to work as it should

image

While on other it does not

image

The config goes like this, using lazy:

-- colorscheme.lua

function ColorMyPencils(color)
    color = color or "darkvoid"
    vim.cmd.colorscheme(color)

    vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
    vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end

return {
    "aliqyan-21/darkvoid.nvim",
    cond = not vim.g.vscode,
    config = function()
        vim.cmd("colorscheme darkvoid")
        require('darkvoid').setup({
            transparent = true,
            glow = true,
            plugins = {
                gitsigns = true,
                nvim_cmp = true,
                treesitter = true,
                nvimtree = true,
                telescope = true,
                lualine = true,
                bufferline = true,
                oil = true,
                whichkey = true,
                nvim_notify = true,
            },
        })
        ColorMyPencils()
    end
}

-- lualine.lua

return {
    'nvim-lualine/lualine.nvim',
    cond = not vim.g.vscode,
    dependencies = { 'nvim-tree/nvim-web-devicons' },
    config = function()
        require("darkvoid").setup()
        require('lualine').setup {
            options = {
                theme = "auto",  -- cannot set "darkvoid", but even so, it makes no difference
                icons_enabled = true, 
                component_separators = { left = '', right = '' },
                section_separators = { left = '', right = '' },
                disabled_filetypes = {
                    statusline = {},
                    winbar = {},
                },
                ignore_focus = {},
                always_divide_middle = true,
                globalstatus = false,
                refresh = {
                    statusline = 1000,
                    tabline = 1000,
                    winbar = 1000,
                }
            },
            sections = {
                lualine_a = { 'mode' },
                lualine_b = { 'branch', 'diff', 'diagnostics' },
                lualine_c = { 'filename' },
                lualine_x = { 'encoding', 'fileformat', 'filetype' },
                lualine_y = { 'progress' },
                lualine_z = { 'location' }
            },
            inactive_sections = {
                lualine_a = {},
                lualine_b = {},
                lualine_c = { 'filename' },
                lualine_x = { 'location' },
                lualine_y = {},
                lualine_z = {}
            },
            tabline = {},
            winbar = {},
            inactive_winbar = {},
            extensions = {}
        }
    end
}
Aliqyan-21 commented 4 days ago

Hello @AndreiMoraru123,

So, your solution is... since you like the default one there is option for everybody right as this is cutomizable theme and everyone can keep it the way they want! Just in your config, make lualine = false.

-- colorscheme.lua

function ColorMyPencils(color)
    color = color or "darkvoid"
    vim.cmd.colorscheme(color)

    vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
    vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end

return {
    "aliqyan-21/darkvoid.nvim",
    cond = not vim.g.vscode,
    config = function()
        vim.cmd("colorscheme darkvoid")
        require('darkvoid').setup({
            transparent = true,
            glow = true,
            plugins = {
                gitsigns = true,
                nvim_cmp = true,
                treesitter = true,
                nvimtree = true,
                telescope = true,
                lualine = false, -- here make lualine support off and you are good to go.
                bufferline = true,
                oil = true,
                whichkey = true,
                nvim_notify = true,
            },
        })
        ColorMyPencils()
    end
}

Works?

AndreiMoraru123 commented 4 days ago

Thanks for clarifying, @Aliqyan-21. It now seems to get triggered even with lualine set to false:

image

and then opening it again:

image

I opened this issue because the line keeps changing on different occasions. You are probably right that I got something off in my config, but I don't understand why the shift between the two looks takes place

If you prefer, I could probably make a screen recording of this, as it would better explain the behavior.

Aliqyan-21 commented 4 days ago

in your config (sorry @AndreiMoraru123 for not seeing it before):

Current:

-- colorscheme.lua

function ColorMyPencils(color)
    color = color or "darkvoid"
    vim.cmd.colorscheme(color)

    vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
    vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end

return {
    "aliqyan-21/darkvoid.nvim",
    cond = not vim.g.vscode,
    config = function()
        vim.cmd("colorscheme darkvoid")
        require('darkvoid').setup({
            transparent = true,
            glow = true,
            plugins = {
                gitsigns = true,
                nvim_cmp = true,
                treesitter = true,
                nvimtree = true,
                telescope = true,
                lualine = false, -- here make lualine support off and you are good to go.
                bufferline = true,
                oil = true,
                whichkey = true,
                nvim_notify = true,
            },
        })
        ColorMyPencils()
    end
}

You need to put the plugins inside colors actually...

Corrected

-- colorscheme.lua

function ColorMyPencils(color)
    color = color or "darkvoid"
    vim.cmd.colorscheme(color)

    vim.api.nvim_set_hl(0, "Normal", { bg = "none" })
    vim.api.nvim_set_hl(0, "NormalFloat", { bg = "none" })
end

return {
    "aliqyan-21/darkvoid.nvim",
    cond = not vim.g.vscode,
    config = function()
        vim.cmd("colorscheme darkvoid")
        require('darkvoid').setup({
            transparent = true,
            glow = true,
            colors = {
                plugins = {
                    gitsigns = true,
                    nvim_cmp = true,
                    treesitter = true,
                    nvimtree = true,
                    telescope = true,
                    lualine = false, -- here make lualine support off and you are good to go.
                    bufferline = true,
                    oil = true,
                    whichkey = true,
                    nvim_notify = true,
                }
            }

        })
        ColorMyPencils()
    end
}

Try if this is working @AndreiMoraru123

AndreiMoraru123 commented 4 days ago

Interestingly, it now results in a different color 😆

image