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

fix: get_range shim for playground #4555

Merged
merged 1 commit into from Mar 24, 2023
Merged

Conversation

dtomvan
Copy link
Contributor

@dtomvan dtomvan commented Mar 24, 2023

This PR adds more shims in the nvim-treesitter.compat module and reroutes every
occurrence of the old function calls to the new ones, to comply with the
breaking neovim/neovim@cbbf8bd.

I have made this pull request to quickly solve deprecation messages for those on
neovim nightly, such as in nvim-treesitter/playground#120.

@dtomvan dtomvan force-pushed the master branch 2 times, most recently from 04ade4e to fd25dad Compare March 24, 2023 21:18
@dtomvan dtomvan changed the title chore(compat): Add more shims for as of neovim/neovim@cbbf8bd fix: get_range shim for playground Mar 24, 2023
@dtomvan
Copy link
Contributor Author

dtomvan commented Mar 24, 2023

Oops, changing the vim.treesitter.get_node back to vim.treesitter.get_node_at_pos because it hasn't existed so far on stable appearantely.

@max397574
Copy link

you should just add if statements to check if the new functions exists and if so you should use them I guess

@dtomvan
Copy link
Contributor Author

dtomvan commented Mar 24, 2023

you should just add if statements to check if the new functions exists

@max397574 that's the point of the compat module, maybe this could be a shim too but the only use were in the tests and I won't touch those (even though I did in the first pass of this tiny contribution).

@lewis6991 lewis6991 merged commit 5c3e8de into nvim-treesitter:master Mar 24, 2023
8 checks passed
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 this pull request may close these issues.

None yet

4 participants