p00f / nvim-ts-rainbow

Rainbow parentheses for neovim using tree-sitter. Use https://sr.ht/~p00f/nvim-ts-rainbow instead
Apache License 2.0
869 stars 67 forks source link

Not sure whether it is a bug or expected behavour, but loading this extension plugin before any colorscheme throws error #121

Open charlie39 opened 2 years ago

charlie39 commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

Just letting you know anyway since i didn't find any mentioed of it anywhere:

Loading this before any colorscheme throws a bunch of errors. Lazy loading with packadd. Tried with the aurora colorscheme and a bunch of base16 colorscheme.

Steps to reproduce Steps to reproduce the behavior. Please also paste the code which has buggy highlighting here. try loading it before the mentioned colorschemes.

packadd aurora
packadd nvim-ts-rainbow

Error log :

Error detected while processing /home/charlie/.config/nvim/init.lua:
E5113: Error while calling lua chunk: /home/charlie/.config/nvim/init.lua:195: Vim(lua):E5108: Error executing lua
 ...pack/packer/opt/nvim-ts-rainbow/lua/rainbow/internal.lua:25: attempt to index a nil value
stack traceback:
        ...pack/packer/opt/nvim-ts-rainbow/lua/rainbow/internal.lua:25: in main chunk
        [C]: in function 'require'
        [string ":lua"]:1: in main chunk
        [C]: in function 'cmd'
        /home/charlie/.config/nvim/init.lua:195: in main chunk
stack traceback:
        [C]: in function 'cmd'
        /home/charlie/.config/nvim/init.lua:195: in main chunk
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: /usr/share/nvim/runtime/filetype.lua:20: Vim(append):Error executing lua callback: .
..er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:485: loop or previous error loading module 'rainbow.int
ernal'
stack traceback:
        [C]: in function 'resolve_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:485: in function 'detach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:499: in function 'reattach_module'
        ...er/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:109: in function <...er/start/nvim-treesitter/
lua/nvim-treesitter/configs.lua:108>
        [C]: in function 'nvim_buf_set_option'
        /usr/share/nvim/runtime/filetype.lua:20: in function </usr/share/nvim/runtime/filetype.lua:11>
stack traceback:
        [C]: in function 'nvim_buf_set_option'
        /usr/share/nvim/runtime/filetype.lua:20