neovim / neovim

Vim-fork focused on extensibility and usability
https://neovim.io
Other
82.71k stars 5.66k forks source link

UpdateRemotePlugins does not work #30470

Open bon-ami opened 4 weeks ago

bon-ami commented 4 weeks ago

Problem

previously everything worked fine. I uninstalled Python 3.9, etc. and manually removed most stuffs. Then I extracted nvim and installed Python 3.8.5. Now :UpdateRemotePlugins does not change rplugin.vim for either Shougo/deoplete.nvim or gelguy/wilder.nvim. (I'm using Plug.) the command results in "python3 host registered plugins []" and rplugin.vim is always,

" perl plugins

" node plugins

" python3 plugins

" ruby plugins

Thank you in advance.

Steps to reproduce

  1. use Plug to install deoplete and wilder. I don't know how to use them without any package managers.
  2. restart nvim.
  3. manually run :UpdateRemotePlugins. rplugin.vim is empty
  4. repeat steps 2 and 3. rplugin.vim is still empty thus the plugins cannot load.

Expected behavior

for deoplete on Linux, rplugin.vim consists,

call remote#host#RegisterPlugin('python3', '/home/users/.../.local/share/nvim/plugged/deoplete.nvim/rplugin/python3/deoplete', [
      \ {'sync': v:false, 'name': '_deoplete_init', 'type': 'function', 'opts': {}},
     \ ])

Nvim version (nvim -v)

0.10.1

Vim (not Nvim) behaves the same?

N/A

Operating system/version

Windows 10

Terminal name/version

N/A

$TERM environment variable

N/A

Installation

portable

wookayin commented 4 weeks ago

Please show your full config to configure/load plugins. One possible scenario where rplugins manifest won't be written is when the plugin is not loaded (when, for instance, using lazy loading). Also verify if the plugin has been loaded and is active when :UpdateRemotePlugins is invoked.

bon-ami commented 4 weeks ago

Please show your full config to configure/load plugins. One possible scenario where rplugins manifest won't be written is when the plugin is not loaded (when, for instance, using lazy loading). Also verify if the plugin has been loaded and is active when :UpdateRemotePlugins is invoked.

minimal init.vim as below. as I said, I am not able to use deoplete without Plug. I doubt Plug causes the problem, since it lazy loads. when :UpdateRemotePlugins is invoked manually, deoplete is not run, because it calls python in remote plugin during loading. The problem may be counter-locking.

" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
if &cp | set nocp | endif

packadd! matchit

let g:python3_host_prog = 'D:\\apps\\Python3\\python.exe'  " Python 3

call plug#begin()

Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }

call plug#end()

let g:deoplete#enable_at_startup = 1

" Load all plugins now.
" Plugins need to be added to runtimepath before helptags can be generated.
packloadall
" Load all of the helptags now, after plugins have been loaded.
" All messages and errors will be ignored.
silent! helptags ALL
ipkiss42 commented 1 week ago

This looks like a Windows-specific problem: I have the same problem with wilder and Python 3.12 on nvim 0.10.2 on Windows, but this works fine on Linux with the same versions.

Random guess: maybe some native Python module is not compiling/loading properly on Windows?

Here is the output of :checkhealth python:

provider.python: require("provider.python.health").check()

Python 3 provider (optional)
- Using: g:python3_host_prog = "C:\Python312\python.exe"
- Executable: C:\Python312\python.exe
- Python version: 3.12.6
- pynvim version: 0.5.0
- OK Latest pynvim is installed.

Python virtualenv
- OK no $VIRTUAL_ENV

And here is my minimal vimrc:

let g:python3_host_prog = expand('C:/Python312/python.exe')

" This assumes that Plug is already installed there.
" See instructions on https://github.com/junegunn/vim-plug?tab=readme-ov-file#installation
source $HOME/.vim/autoload/plug.vim

call plug#begin(expand('~/.vim/installed'))
Plug 'gelguy/wilder.nvim', {'do' : ':UpdateRemotePlugins'}
call plug#end()

" This assmes that wilder has already been installed, i.e. that :PlugInstall has been run previously
call wilder#setup({ 'modes': [':'] })
" Optional, but this makes the error more visible
"call wilder#set_option('renderer', wilder#popupmenu_renderer())

With this setup, :UpdateRemotePlugins does not register wilder, causing errors e.g. when opening a file with :e.

justinmk commented 1 week ago

FYI before anyone works too hard on this: :UpdateRemotePlugins will be deprecated pretty soon https://github.com/neovim/neovim/issues/27949 . Only thing blocking it is updating the https://github.com/neovim/pynvim api client and perhaps providing a way to help v1 remote-plugins migrate to v2.