TheGLander / indent-rainbowline.nvim

Rainbow-ize your indents in Neovim today!
19 stars 3 forks source link

Setup function of indent-blankline version 2, but you have version 3 installed #5

Open Pismice opened 6 months ago

Pismice commented 6 months ago

Hello,

When trying to use the plugin with your configuration i get this error I have not idea how to fix since i didnt find any migration information

Error detected while processing /home/tetratrux/.config/nvim/init.lua:
You are trying to call the setup function of indent-blankline version 2, but you have version 3 instal
led.
Take a look at the GitHub wiki for instructions on how to migrate, or revert back to version 2.
Pismice commented 6 months ago

Either that or when I:

  {
    "lukas-reineke/indent-blankline.nvim",
    main = "ibl",
    version = "2.20.3",
    opts = function(_, opts)
      -- Other blankline configuration here
      return require("indent-rainbowline").make_opts(opts)
    end,
    dependencies = {
      "TheGLander/indent-rainbowline.nvim",
    },
  },

This is what I get:

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

.../indent-rainbowline.nvim/lua/indent-rainbowline/init.lua:1: module 'ibl.hooks' not found:
^Ino field package.preload['ibl.hooks']
cache_loader: module ibl.hooks not found
cache_loader_lib: module ibl.hooks not found
^Ino file './ibl/hooks.lua'
^Ino file '/build/nvim/parts/nvim/build/.deps/usr/share/luajit-2.1/ibl/hooks.lua'
^Ino file '/usr/local/share/lua/5.1/ibl/hooks.lua'
^Ino file '/usr/local/share/lua/5.1/ibl/hooks/init.lua'
^Ino file '/build/nvim/parts/nvim/build/.deps/usr/share/lua/5.1/ibl/hooks.lua'
^Ino file '/build/nvim/parts/nvim/build/.deps/usr/share/lua/5.1/ibl/hooks/init.lua'
^Ino file './ibl/hooks.so'
^Ino file '/usr/local/lib/lua/5.1/ibl/hooks.so'
^Ino file '/build/nvim/parts/nvim/build/.deps/usr/lib/lua/5.1/ibl/hooks.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'
^Ino file './ibl.so'
^Ino file '/usr/local/lib/lua/5.1/ibl.so'
^Ino file '/build/nvim/parts/nvim/build/.deps/usr/lib/lua/5.1/ibl.so'
^Ino file '/usr/local/lib/lua/5.1/loadall.so'

# stacktrace:
  - /indent-rainbowline.nvim/lua/indent-rainbowline/init.lua:1
  - init.lua:70 _in_ **values**
  - init.lua:22
maciejkrol18 commented 2 months ago

i didnt find any migration information

It's in the indent-blankline repo

I fixed this by adding main = 'ibl' to the custom plugin file so that it looks like so:

return {
  'lukas-reineke/indent-blankline.nvim',
  main = 'ibl',
  opts = function(_, opts)
    -- Other blankline configuration here
    return require('indent-rainbowline').make_opts(opts)
  end,
  dependencies = {
    'TheGLander/indent-rainbowline.nvim',
  },
}

Looks like you shouldn't add version . Additionally, you have to add this to your init.lua file

require('ibl').setup()

Now neovim normally launches without any error message, however the rainbow effect does not work, instead the default vertical line indent from indent-blankline is shown

Doesn't look like it's going to be fixed, this repo seems abandoned