luisiacc / gruvbox-baby

Gruvbox theme for neovim with full 🎄TreeSitter support.
MIT License
390 stars 28 forks source link

[Error] ColoScheme goes wrong with Lazyvim. #77

Closed Tunglies closed 3 months ago

Tunglies commented 3 months ago

The basic lua initial script with Lazyvim

{
    "luisiacc/gruvbox-baby",
    lazy = false,
    priority = 1000,
    opts = {
    background_color = "medium",
    transparent_mode = false,
    cinnebt_style = "italic",
    keyword_style = "italic",
    string_style = "nocombine",
    function_style = "bold",
    variable_style = "NONE",
    highlights = {},
    color_overrides = {},
    use_original_palette = false,
    },
},

When I switch to coloscheme gruvbox-baby, vim raises errors.

Error detected while processing CursorMoved Autocommands for "*":
Error executing lua callback: ...re/nvim/lazy/indent-blankline.nvim/lua/ibl/virt_text.lua:95: attempt
to index a nil value
stack traceback:
        ...re/nvim/lazy/indent-blankline.nvim/lua/ibl/virt_text.lua:95: in function 'get'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:424: in function 'refresh'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:127: in function 'debounced_refres
h'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:143: in function 'debounced_refres
h'
        ...are/nvim/lazy/indent-blankline.nvim/lua/ibl/autocmds.lua:27: in function <...are/nvim/lazy/
indent-blankline.nvim/lua/ibl/autocmds.lua:26>

And move the cursor it also raises errors.

Error executing vim.schedule lua callback: ...re/nvim/lazy/indent-blankline.nvim/lua/ibl/virt_text.lua
:95: attempt to index a nil value
stack traceback:
        ...re/nvim/lazy/indent-blankline.nvim/lua/ibl/virt_text.lua:95: in function 'get'
        ...l/share/nvim/lazy/indent-blankline.nvim/lua/ibl/init.lua:424: in function ''
        vim/_editor.lua: in function <vim/_editor.lua:0>

I am using Nvchad version 2.5, Neovim v0.11.0-dev which built from source and its build in Lazy.

What should I do to fix this? Or should some Lazy management support?

luisiacc commented 3 months ago

Looks like some clash between the colors and the indent-blankline plugin, could you try the stable nvim version and see if you get the same error? Also, does it happen if you remove the indent-blankline plugin?

Tunglies commented 3 months ago

Looks like some clash between the colors and the indent-blankline plugin, could you try the stable nvim version and see if you get the same error? Also, does it happen if you remove the indent-blankline plugin?

I uninstall the dev version Neovim and install vertsion 0.9.5 stable from apt. It still goes same errors.

It is clash between the colors and the ident-blankline.nvim plugin. I tried and successed fix errors by add Lazy initial script.

require("lazy").setup({
    {
        "lukas-reineke/indent-blankline.nvim",
        config = function()
            require("indent_blankline").setup {
                char = "|",
                buftype_exclude = {"terminal"},
                filetype_exclude = {"help", "dashboard", "NvimTree"},
                show_trailing_blankline_indent = false,
                show_first_indent_level = false,
            }
        end
    }
})

Thanks for you help!