vim-illuminate icon indicating copy to clipboard operation
vim-illuminate copied to clipboard

Do not rely on nvim-treesitter module system

Open ofseed opened this issue 1 year ago • 1 comments

The nvim-treesitter has an experimental main branch, which will be the default in the future. It dropped the module system, so the following code https://github.com/RRethy/vim-illuminate/blob/82aae86241aee16812741f2f4bf0dbd124c01de2/plugin/illuminate.vim#L15-L22 will not be valid anymore.

Some APIs were built-in by vim.treesitter and will be removed from the main branch of nvim-treesitter, so the following API https://github.com/RRethy/vim-illuminate/blob/5eeb7951fc630682c322e88a9bbdae5c224ff0aa/lua/illuminate/providers/treesitter.lua#L1-L1 https://github.com/RRethy/vim-illuminate/blob/5eeb7951fc630682c322e88a9bbdae5c224ff0aa/lua/illuminate/providers/treesitter.lua#L9-L9 has an equivalent API, vim.treesitter.get_node().

Many plugins already support the nvim-treesitter main branch because it could be compatible with the mainstream master branch, and I noticed that it should not need much work for this plugin to be compatible with the main branch. Since the main branch will be the default in the future, it would be better if this plugin supports it faster.

ofseed avatar Jun 19 '24 05:06 ofseed

Yea, I've been aware of this for some time I just haven't found the time to implement it. I'm open to PRs which fix this if you have time to spare. Eventually I'll get to it, just not sure when.

RRethy avatar Jun 19 '24 15:06 RRethy