neovim / pynvim

Python client and plugin host for Nvim
http://pynvim.readthedocs.io/en/latest/
Apache License 2.0
1.47k stars 118 forks source link

How do you access the treesitter API via pynvim? #568

Closed kdog3682 closed 2 months ago

kdog3682 commented 2 months ago

When I inspect nvim.api.treesitter , I get a "class functions.partial".

However, when I tried to do nvim.api.treesitter.get_node(). I get the message that get_node is not defined.

Really ppreciate any advice on how to use pynvim API for this.

justinmk commented 2 months ago

via Lua https://pynvim.readthedocs.io/en/latest/usage/python-plugin-api.html#lua-integration