lukas-reineke / indent-blankline.nvim

Indent guides for Neovim
MIT License
3.98k stars 99 forks source link

Broken after the update to v3.6.0 #869

Closed savchenko closed 2 months ago

savchenko commented 2 months ago

Problem

v3.6.0 fails here: https://github.com/lukas-reineke/indent-blankline.nvim/blob/171d4d5a1560ccb556e94aa6df7e969068384049/lua/ibl/utils.lua#L427-L429

Failed to run `config` for indent-blankline.nvim

.../share/nvim/lazy/indent-blankline.nvim/lua/ibl/utils.lua:428: attempt to call field 'iter' (a nil value)

# stacktrace:
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/util.lua:101 _in_ **iter**
  - /indent-blankline.nvim/lua/ibl/utils.lua:428 _in_ **tbl_join**
  - /indent-blankline.nvim/lua/ibl/config.lua:253 _in_ **merge_configs**
  - /indent-blankline.nvim/lua/ibl/config.lua:276 _in_ **set_config**
  - /indent-blankline.nvim/lua/ibl/init.lua:57 _in_ **setup**
  - ~/.config/nvim/lua/addons/indent-blankline.lua:11 _in_ **config**
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/loader.lua:359
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/util.lua:113 _in_ **try**
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/loader.lua:374 _in_ **config**
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/loader.lua:341 _in_ **_load**
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/loader.lua:187 _in_ **load**
  - ~/.local/share/nvim/site/lazy/lua/lazy/core/loader.lua:119 _in_ **startup**
  - ~/.local/share/nvim/site/lazy/lua/lazy/init.lua:110 _in_ **setup**
  - ~/.config/nvim/lua/config/lazy.lua:4
  - ~/.dotfiles/files/nvim/init.lua:9

v3.5.4 works fine though.

Steps to reproduce

Run with the following config:

return {
    {
        url = 'https://github.com/lukas-reineke/indent-blankline.nvim',
        version = '3.5.4', -- v3.6.0 is broken
        main = 'ibl',
        config = function()
            local ibl = require('ibl')

            ibl.setup({

                enabled = false,
                indent = {
                    highlight = { "Grey85" },
                    char = '▏',
                    priority = 2,
                },

                scope = {
                    enabled = true,
                    show_start = false,
                    show_end = false,
                    injected_languages = true,
                    priority = 1
                },

                exclude = {
                    filetypes = {
                        'help',
                        'lazy',
                        'neo-tree',
                        'notify',
                        'text',
                    }
                }

            })

            local hooks = require('ibl.hooks')
            hooks.register(
                hooks.type.WHITESPACE,
                hooks.builtin.hide_first_space_indent_level)
        end

    }
}

Expected behavior

v3.6.0 works the same as the v3.5.4

Neovim version (nvim -v)

NVIM v0.9.4

lukas-reineke commented 2 months ago

You are using an old version of Neovim. Please update to the latest stable release.

Dillongc21 commented 2 months ago

FYI for anyone on arch, you can follow the latest development version by installing "neovim-git" package from AUR. I just switched to this package and can confirm this fixed the bug.

zmy20220416 commented 2 months ago

@lukas-reineke @Dillongc21 same issue with neovim 0.95

LukaK commented 2 months ago

Having the same issue as well in neovim version 0.95

itsmenewbie03 commented 2 months ago

Fixed by updating to the latest release build which can be found here

metal3d commented 2 months ago

You are using an old version of Neovim. Please update to the latest stable release.

I'm OK, Fedora is up-to-date, and so on...

But, as everybody know it, Ubuntu is a shame and only provides a "stable" package which is 0.9.4 (from 2023)... LTS is not my goal, but it could be nice to keep compatibility.

I could, of course, use the edge version (0.10.x).

(Definitively, I hate Ubuntu 😉) (Personally, I do not take care of Ubuntu when I propose software packages, especially because they are not up-to-date - so I understand your point)

lukas-reineke commented 2 months ago

This plugin only supports the latest stable version, which is 0.10, and the latests nighly version of Neovim. If you want to continue to use 0.9, please pin the IBL version to 3.5.

lukas-reineke commented 2 months ago

Latest version should work with 0.9 again. But I make no guarantees, this plugin only officially supports the latest stable Neovim version. If you do not want to update yet, please pin the version of this plugin.