You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want(ed) to write a python neovim plugin and from everything I could find on the internet pynvim and rplugins are the "new-style" of doing it. I know python and spent a few days on lua neovim plugins, so I though it would be pretty straight forward. Getting used to a slightly different api and that's it.
But I spent now half a day trying to find examples and documentation how to actually write a python (pynvim) neovim plugin and my "new plugin" consists of 20 lines from the pynvim documentation, that's pretty frustrating.
I got stuck with the question how to integrate pynvim rplugins into a packer environment. Installation is not the issue, but how do pynvim plugins get setup / configured? How do I call a setup(lua_table_config) (or equivalent) function on a pynvim plugin? Or is there any other way such a plugin is supposed to be configured from within a lua neovim configuration?
I finally started browsing https://github.com/topics/neovim?l=python to find examples (and discarding global vim variables) I finally found a hint that lead me to this proof of concept for a "solution":
config= {
xyz=1,
blablub=true,
foo= { bar='blub'}
}
-- TestFunction is a pynvim decorated rplugin function (from the examples ;)vim.api.nvim_call_function("TestFunction", {config})
This took me quite a long time to figure this out and I think it would be nice to have somewhere more documentation and examples how the basics (for example configuration) of real world pynvim rplugins are supposed to be designed.
There are some very basic examples and documentation out there but that's pretty much everything I could find. The real world examples I finally could find where mostly so complex that it was pretty hard to get the information I was looking for.
This makes it pretty hard to get into pynvim.
So the bottom line are the following question:
how are pynvim rplugins supposed to get configure / setup from a lua environment?
are there more examples / documentation for pynvim rplugins that demonstrate how the basics (like configuration) of pynvim plugins are supposed to be designed
and if so, why can't I find them......
Thx, I'm looking forward to use pynvim as plugin language for neovim, sounds like a great combination.
The text was updated successfully, but these errors were encountered:
I want(ed) to write a python neovim plugin and from everything I could find on the internet pynvim and rplugins are the "new-style" of doing it. I know python and spent a few days on lua neovim plugins, so I though it would be pretty straight forward. Getting used to a slightly different api and that's it.
But I spent now half a day trying to find examples and documentation how to actually write a python (pynvim) neovim plugin and my "new plugin" consists of 20 lines from the pynvim documentation, that's pretty frustrating.
I got stuck with the question how to integrate pynvim rplugins into a packer environment. Installation is not the issue, but how do pynvim plugins get setup / configured? How do I call a
setup(lua_table_config)
(or equivalent) function on a pynvim plugin? Or is there any other way such a plugin is supposed to be configured from within a lua neovim configuration?I finally started browsing https://github.com/topics/neovim?l=python to find examples (and discarding global vim variables) I finally found a hint that lead me to this proof of concept for a "solution":
This took me quite a long time to figure this out and I think it would be nice to have somewhere more documentation and examples how the basics (for example configuration) of real world pynvim rplugins are supposed to be designed.
There are some very basic examples and documentation out there but that's pretty much everything I could find. The real world examples I finally could find where mostly so complex that it was pretty hard to get the information I was looking for.
This makes it pretty hard to get into pynvim.
So the bottom line are the following question:
Thx, I'm looking forward to use pynvim as plugin language for neovim, sounds like a great combination.
The text was updated successfully, but these errors were encountered: