Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not rely on nvim-treesitter module system #201

Open
ofseed opened this issue Jun 19, 2024 · 1 comment · May be fixed by #210
Open

Do not rely on nvim-treesitter module system #201

ofseed opened this issue Jun 19, 2024 · 1 comment · May be fixed by #210

Comments

@ofseed
Copy link
Contributor

ofseed commented Jun 19, 2024

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

ts.define_modules({
illuminate = {
module_path = 'illuminate.providers.treesitter',
enable = true,
disable = {},
is_supported = require('nvim-treesitter.query').has_locals,
}
})

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

local ts_utils = require('nvim-treesitter.ts_utils')

local node_at_point = ts_utils.get_node_at_cursor()

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.

@RRethy
Copy link
Owner

RRethy commented Jun 19, 2024

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.

@pynappo pynappo linked a pull request Aug 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants