kiddos / gemini.nvim

gemini bindings for Neovim
30 stars 4 forks source link

Can not call plugin #1

Closed lu5her-s closed 8 months ago

lu5her-s commented 8 months ago
 Error: Error executing vim.schedule lua callback: ...lu5her/.local/share/nvim/lazy/gemini.nvim/lua/gemini.lua:112: Vim:E117: Unknown function: _gemini_api_stream_async
stack traceback:
    [C]: in function 'nvim_call_function'
    ...lu5her/.local/share/nvim/lazy/gemini.nvim/lua/gemini.lua:112: in function ''
    vim/_editor.lua: in function ''
    vim/_editor.lua: in function <vim/_editor.lua:0>

when use <Ctrl+o> to call plugin

pynvim = 0.5.0 python = 3.11 os = manjaro_x64

kiddos commented 8 months ago

Hi, did you do :UpdateRemotePlugin to register that function?

lu5her-s commented 8 months ago

ok, I see the problem. this is problem from python provider in nvim. will set g.python3_host_prog , and set g.loaded_python3_provider = nill (not 0 or 1) to solve this

5huanghuai commented 7 months ago

when i use :UpdateRemotePlugin ,i get this error. it seems like doesn't run 'pip install -r requirements.txt'

Encountered ModuleNotFoundError loading plugin at /home/xx/.local/share/nvim/lazy/gemini.nvim/rplugin/python3/gemini: No module named 'google'
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pynvim/plugin/host.py", line 187, in _load
    module = _handle_import(directory, name)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pynvim/plugin/host.py", line 40, in _handle_import
    return importlib.import_module(name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
ModuleNotFoundError: No module named 'google'
remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: /home/xx/.local/share/nvim/rplugin.vim

I install python through this .

sudo pacman -S python python-neovim python-pip

os: Arch python:3.11.8 pip: 24.0 python-neovim : 0.5.0

kiddos commented 6 months ago

in my plugin configuration I did this:

{
  'kiddos/gemini.nvim',
  build = { 'pip install -r requirements.txt', ':UpdateRemotePlugins' },
  config = function()
    require('gemini').setup()
  end
}

to run pip install -r requirements.txt