r/lua • u/Bullzzie • May 31 '25
Need A bit help with Neovim plugin development
I am working on a project called model-cmp.nvim, which used python to run LLMs locally and allow text autocomplete in neovim using the model predictions. The development is taking longer than expected, the model efficiency development is taking too much time, though I can handle that part. While keeping the modelapi in one hand, it is very difficult to develop actual plugin. So I was wondering if someone would like to handle the plugin development process. The link for the plugin is https://github.com/PyDevC/model-cmp.nvim
3
Upvotes
View all comments
Show parent comment
2
u/BrianHuster Jun 01 '25
In case you want to integrate Python with Lua, there are 2 official ways in Nvim.
The first is using legacy
if_pythinterface. You can run Python code from Lua usingvim.cmd.py3, and evaluate a Python expression withvim.fn.py3eval. However, there is no way to call a Python function from Lua and pass Lua params to it, as Nvim only supports Vim 7.3 version ofif_pyth.The second is by using the remote plugin architecture (see the
pynvimrepo for details), it would allows you to define a Vimscript function from Python, and you can call that Vimscript function from Lua. However, this architecture will be deprecated in favor of a yet-developed one called "remote module"