Skip to content
This repository has been archived by the owner on Jan 17, 2024. It is now read-only.

fix: Rename deprecated vim.treesitter calls #120

Merged
merged 1 commit into from Apr 7, 2023

Conversation

dtomvan
Copy link
Contributor

@dtomvan dtomvan commented Mar 24, 2023

@clason
Copy link
Contributor

clason commented Mar 24, 2023

Thank you, but that would break users on 0.8. You should be using nvim-treesitter's new compat module; see the recent PR there.

@dtomvan
Copy link
Contributor Author

dtomvan commented Mar 24, 2023

@clason
Copy link
Contributor

clason commented Mar 24, 2023

Yes, exactly!

@dtomvan
Copy link
Contributor Author

dtomvan commented Mar 24, 2023

OK, I will try to contribute some of the compatibility shims I need, then I'll try to get back to you.

@clason
Copy link
Contributor

clason commented Mar 24, 2023

Can't you just use the ones from nvim-treesitter? Or is there one missing that you'd need?

@dtomvan
Copy link
Contributor Author

dtomvan commented Mar 24, 2023

I would need these two just get_range (some of the functions have existed before, should've checked first instead of rushing to a hotfix) but the compat module seems to also exist for any 3rd-party plugins, so any breaking changes should go in the compat.lua file anyways.

dtomvan added a commit to dtomvan/nvim-treesitter that referenced this pull request Mar 24, 2023
@dtomvan
Copy link
Contributor Author

dtomvan commented Apr 7, 2023

Hi, can this be merged? I'm sorry if I'm wasting your time.

@clason clason merged commit db54848 into nvim-treesitter:master Apr 7, 2023
2 checks passed
@wookayin
Copy link
Member

This seems to make neovim 0.7-0.8 broken with the playground plugin installed.

wookayin added a commit to wookayin/dotfiles that referenced this pull request Apr 14, 2023
nvim-treesitter-playground broke neovim older than 0.9
(see nvim-treesitter/playground#120), so I pin the plugin at an
older version that is compatible with neovim 0.7.x and 0.8.x.
@theHamsta
Copy link
Member

Yes, the compat module was just used in some places. Could you create a PR that would use it everywhere in this diff?

theHamsta added a commit to theHamsta/playground that referenced this pull request Apr 15, 2023
PR nvim-treesitter#120 used nvim-treesitter.compat in some occasions but not all:
https://github.com/nvim-treesitter/playground/pull/120/files

This made nvim-treesitter-playground incompatible with older
Neovim versions nvim-treesitter#120 (comment)

Although, we generally only support latest Neovim stable this is a
unnecessary inconsistency in the code base. Also when, ts_compat should
be removed in future it should there will be only one source of
`get_node_text` that can then be swapped consistently around the whole
code base. nvim-treesitter-playground is especially useful for older
Neovim versions that don't have the built-in playground yet.
amaanq pushed a commit that referenced this pull request Apr 15, 2023
PR #120 used nvim-treesitter.compat in some occasions but not all:
https://github.com/nvim-treesitter/playground/pull/120/files

This made nvim-treesitter-playground incompatible with older
Neovim versions #120 (comment)

Although, we generally only support latest Neovim stable this is a
unnecessary inconsistency in the code base. Also when, ts_compat should
be removed in future it should there will be only one source of
`get_node_text` that can then be swapped consistently around the whole
code base. nvim-treesitter-playground is especially useful for older
Neovim versions that don't have the built-in playground yet.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants