HiPhish / rainbow-delimiters.nvim

Rainbow delimiters for Neovim with Tree-sitter
https://gitlab.com/HiPhish/rainbow-delimiters.nvim
Apache License 2.0
470 stars 35 forks source link

"module 'rainbow-delimiters' not found" #34

Closed m1guer closed 9 months ago

m1guer commented 10 months ago

image i'm setting up something wrong?

HiPhish commented 10 months ago

There is no setup function, it's a plug & play plugin (as Vim plugins are meant to be). You just install it an you are good to go. It will pick up your settings automatically. But from the looks of the error message it looks like the plugin cannot be found. How did you install it?

m1guer commented 10 months ago

i'm installing using Lazy. image

HiPhish commented 10 months ago

What do you get when you execute :lua =require 'rainbow-delimiters'? You should get a table that looks like this:

{
  disable = <function 1>,
  enable = <function 2>,
  hlgroup_at = <function 3>,
  strategy = {
    global = {
      on_attach = <function 4>,
      on_detach = <function 5>,
      on_reset = <function 6>
    },
    ["local"] = {
      on_attach = <function 7>,
      on_detach = <function 8>,
      on_reset = <function 9>
    },
    noop = {
      on_attach = <function 10>,
      on_detach = <function 11>,
      on_reset = <function 12>
    }
  },
  toggle = <function 13>
}
m1guer commented 10 months ago

yep! image

HiPhish commented 10 months ago

OK, then you should be good to go. Replace the line

local rainbow_delimiters = require("rainbow-delimiters").setup()

with

local rainbow_delimiters = require("rainbow-delimiters")

The only reason you need that table in the first place is to reference the two strategy objects. Otherwise you would not need it.

m1guer commented 10 months ago

I fixed it a few minutes ago, but thanks

Em sáb, 2 de set de 2023 06:26, Alejandro Sanchez @.***> escreveu:

OK, then you should be good to go. Replace the line

local rainbow_delimiters = require("rainbow-delimiters").setup()

with

local rainbow_delimiters = require("rainbow-delimiters")

The only reason you need that table in the first place is to reference the two strategy objects. Otherwise you would not need it.

— Reply to this email directly, view it on GitHub https://github.com/HiPhish/rainbow-delimiters.nvim/issues/34#issuecomment-1703777559, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVZ7UI2ZEH5RXEPZYSLYA73XYL3TDANCNFSM6AAAAAA4IOIFLU . You are receiving this because you authored the thread.Message ID: @.***>

HiPhish commented 9 months ago

I am closing this now since it seems to be resolved.