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

Treesitter hl map has been removed in neovim nightly #135

Closed akinsho closed 2 years ago

akinsho commented 2 years ago

This plugin now errors when used, since the latest nightly version of neovim removed the hlmap for treesitter that this plugin depends on. You now get the following error, running this plugin on nightly.

reference: https://github.com/neovim/neovim/pull/19931

E5108: Error executing lua ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:165: Vim(echomsg):E114: Missing quote: "Error in packer_compiled: ...vim/site/pack/packer/opt/packer.nvim
/lua/packer/load.lua:155: Vim(append):Error executing lua callback: ...ar/neovim/HEAD-2ecb407_1/share/nvim/runtime/filetype.lua:20: Vim(append):Error executing lua callback: ...ck/packer/start
/nvim-ts-rainbow/lua/rainbow/internal.lua:202: attempt to index local 'hlmap' (a nil value)                                                                                                     
stack traceback:                                                                                                                                                                                
        [C]: in function 'cmd'                                                                                                                                                                  
        ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:165: in function <...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:161>                                          
        [string ":lua"]:1: in main chunk  

Steps to reproduce

Just open neovim nightly with this plugin enabled

p00f commented 2 years ago

fwiw hl_map code was in detach, this should not have errored by just opening nvim

akinsho commented 2 years ago

Thanks for the quick fix @p00f. Yeah, I searched for the offending line in the code base and saw it was in the detach, tbh I'm not sure why it triggered that way for me probably it couldn't be reproduced by just entering th buffer

hadnet commented 1 year ago

Hey, guys, I'm trying to install vim-ts-rainbow using Packer but I got this error:

[packer.nvim] [ERROR 23:00:08] async.lua:20: Error in coroutine: .../pack/packer/opt/packer.nvim/lua/packer/plugin_utils.lua:204: Vim(lua):E5108: Err or executing lua ...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:179: Vim(echomsg):E114: Missing quote: "Error in packer_compiled: ...vim /site/pack/packer/opt/packer.nvim/lua/packer/load.lua:147: Vim(packadd):E5113: Error while calling lua chunk: ...er/opt/nvim-treesitter/lua/nvim-tree sitter/highlight.lua:14: attempt to index local 'hlmap' (a nil value) stack traceback: ^I[C]: in function 'cmd' ^I...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:179: in function <...vim/site/pack/packer/opt/packer.nvim/lua/packer/load.lua:175> ^I/Users/jon/.config/nvim/plugin/packer_compiled.lua:334: in function </Users/jon/.config/nvim/plugin/packer_compiled.lua:323> ^I[C]: in function 'require' ^I...m/site/pack/packer/start/nvim-ts-rainbow/lua/rainbow.lua:17: in main chunk ^I[C]: in function 'require' ^I[string ":lua"]:1: in main chunk ^I[C]: in function 'resume'

Is above related to this issue? I'm using nvim 0.8.1

p00f commented 1 year ago

update the plugin