phenax / cmp-graphql

Neovim nvim-cmp source for graphql completions based on schema
MIT License
10 stars 0 forks source link

Deprecated `get_node_at_pos` use @ `get_ts_node_under_cursor` #1

Closed juanpprieto closed 1 year ago

juanpprieto commented 1 year ago

👋🏼 Hi, thanks for the plugin.

While trying to get the plugin to work, I noticed this warning

vim.treesitter.get_node_at_pos() is deprecated, use vim.treesitter.get_node() instead. :help deprecated
This feature will be removed in Nvim version 0.10
stack traceback:
        ...m/HEAD-e23c6eb/share/nvim/runtime/lua/vim/treesitter.lua:418: in function 'get_ts_node_under_cursor'
        ...te/pack/packer/start/cmp-graphql/lua/cmp-graphql/cmp.lua:16: in function 'is_available'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:99: in function 'get_sources'
        ...re/nvim/site/pack/packer/start/nvim-cmp/lua/cmp/core.lua:311: in function 'fn'
        .../site/pack/packer/start/nvim-cmp/lua/cmp/utils/async.lua:57: in function <.../site/pack/packer/start/n
vim-cmp/lua/cmp/utils/async.lua:55>

PS - got it to work. Thanks again for this amazing plugin!

phenax commented 1 year ago

Thank you for reporting the issue! It should be fixed on main now.

juanpprieto commented 1 year ago

Thanks for the quick turnaround @phenax 🙏🏼