HiPhish / nvim-ts-rainbow2

Rainbow delimiters for Neovim through Tree-sitter
https://gitlab.com/HiPhish/nvim-ts-rainbow2
Apache License 2.0
338 stars 35 forks source link

vim.treesitter.query.get_query() is deprecated, use vim.treesitter.query.get() instead. #21

Closed Kranzes closed 1 year ago

Kranzes commented 1 year ago

I am getting this error on launch:

vim.treesitter.query.get_query() is deprecated, use vim.treesitter.query.get() instead. :help deprecated
This feature will be removed in Nvim version 0.10
stack traceback:
        ...-4863ca6/share/nvim/runtime/lua/vim/treesitter/query.lua:200: in function 'get_query'
        ...ages/start/nvim-treesitter/lua/nvim-treesitter/query.lua:108: in function 'get_query'
        ...ackages/start/nvim-ts-rainbow2/lua/ts-rainbow/module.lua:36: in function 'is_supported'
        ...es/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:387: in function 'is_enabled'
        ...es/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:507: in function 'attach_module'
        ...es/start/nvim-treesitter/lua/nvim-treesitter/configs.lua:532: in function 'reattach_module'
HiPhish commented 1 year ago

You must be using a recent pre-release 0.9 version. The API has changed compared to 0.8, but it's a simple fix. In the meantime you can either live with the deprecation warning or switch to a slightly older version of Neovim. Expect a lot of other Tree-sitter plugins to be broken as well.

HiPhish commented 1 year ago

The issue should be fixed in the current master. Please verify.

Kranzes commented 1 year ago

Yup that fixes it, thanks.