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: vim.treesitter.get_query deprecated #2451

Merged
merged 2 commits into from
Apr 9, 2023

Conversation

theSafdarAwan
Copy link
Contributor

Description

vim.treesitter.get_query is deprecated use vim.treesitter.query.get

Checklist:

  • [x ] My code follows the style guidelines of this project (stylua)
  • [ x] I have performed a self-review of my own code
  • [x ] I have commented my code, particularly in hard-to-understand areas
  • [ x] I have made corresponding changes to the documentation (lua annotations)

@jamestrew
Copy link
Contributor

I think this will break thing for people not using nightly neovim.
Can instead do something like local get_query = vim.treesitter.query.get or vim.treesitter.get_query and then pcall using the get_query function.

Also that checklist formatting is hilarious 🤣

@theSafdarAwan
Copy link
Contributor Author

theSafdarAwan commented Apr 3, 2023

thanks for the suggestion. will do this.

and for the check list i just checked all the list i though this is a one line change no problem 🤣

@Conni2461
Copy link
Member

thanks :)

@Conni2461 Conni2461 merged commit 359e9ff into nvim-telescope:master Apr 9, 2023
Conni2461 pushed a commit that referenced this pull request Apr 9, 2023
* fix: `vim.treesitter.get_query` deprecated

* fix: add fallback for `vim.treesitter.get_query` for stable versions of nvim

(cherry picked from commit 359e9ff)
abelmul pushed a commit to abelmul/telescope.nvim that referenced this pull request Jun 6, 2023
* fix: `vim.treesitter.get_query` deprecated

* fix: add fallback for `vim.treesitter.get_query` for stable versions of nvim
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.

3 participants