nvim-lualine / lualine.nvim

A blazing fast and easy to configure neovim statusline plugin written in pure lua.
MIT License
5.71k stars 455 forks source link

Bug: Lualine configurations are not applied #1244

Open renatojf opened 1 month ago

renatojf commented 1 month ago

Self Checks

How to reproduce the problem

Minimal configuration with Lazy. Added Lualine, with the following configurations:

return {
    "nvim-lualine/lualine.nvim",
    dependencies = { "nvim-tree/nvim-web-devicons" },
    wants = {
        "gitsigns.nvim",
        "gruvbox-material",
    },
    config = function()
        local lualine = require("lualine")
        local lazy_status = require("lazy.status") -- to configure lazy pending updates count

        lualine.get_config()

        lualine.setup({
            options = {
                theme = "gruvbox-material",
            },

            sections = {
                lualine_a = { "mode" },
                lualine_b = { "branch", { "diagnostics", sources = { "nvim_diagnostic" } } },
                lualine_c = { { "filename", path = 2 }, { "lsp_progress" } },
                lualine_x = {
                    {
                        lazy_status.updates,
                        cond = lazy_status.has_updates,
                        color = { fg = "#ff9e64" },
                    },
                    { "encoding" },
                    { "fileformat" },
                    { "filetype" },
                },
            },
        })
    end,
}

It doesn't show up.

image

Expected behaviour

I expect the configurations I had would load up in lualine.

Actual behaviour

It shows only the default configurations.

image

Additional information

Using latest nvim (0.10.0) and latest lualine with bare minimum configurations. Only Lazy + lualine loading up. Other things are Alacritty and Tmux which I also removed all configurations, to make sure they were not somehow overriding things.

I am just unaware on how to debug this further. Any help is appreciated :)

iton0 commented 1 month ago

I don't think there is a bug your config is similar to the default config. 'lsp_progress' is not a component (here are available components). You can move Gitsigns to dependencies and delete wants. And I would just read the the whole README.md for lualine. Hope that helps.

renatojf commented 1 month ago

The issue is that the theme is not getting applied and some of the components are not loading correctly (like the git branch, and I am in a git repo)