Shougo / deoplete.nvim

:stars: Dark powered asynchronous completion framework for neovim/Vim8
Other
5.95k stars 295 forks source link

deoplete fails to load #1213

Closed bon-ami closed 2 months ago

bon-ami commented 2 months ago

Problems summary

I reinstalled neovim and get plugins with Plug. deoplete did not pop auto completion and I had to ^X^O. If I use some GUI for neovim, such as neoray or neovide, a line of _deoplete_init failure flashed in status line. Then I use a minimal init.vim with Plug and deoplete only. Now neovim shows the failure.

It worked before I deleted some data and reinstalled everything. I removed python 3.9 and installed 3.8.5. Thanks in advance.

Environment Information

deoplete.nvim ~

============================================================================== nvim: require("nvim.health").check()

Configuration ~

Runtime ~

Performance ~

Remote Plugins ~

External Tools ~

Python 3 provider (optional) ~

Python virtualenv ~

vim.lsp: Active Clients ~

vim.lsp: File Watcher ~

vim.lsp: Position Encodings ~

python

Requirement already satisfied: pynvim in d:\apps\python3\lib\site-packages (0.5.0)
Requirement already satisfied: msgpack>=0.5.0 in d:\apps\python3\lib\site-packages (from pynvim) (1.0.8)
Requirement already satisfied: greenlet>=3.0 in d:\apps\python3\lib\site-packages (from pynvim) (3.0.3)
Requirement already satisfied: neovim in d:\apps\python3\lib\site-packages (0.3.1)

Provide a minimal init.vim with less than 50 lines (Required!)

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

packadd! matchit

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

call plug#begin()

if has('nvim')
  Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
else
  Plug 'Shougo/deoplete.nvim'
  Plug 'roxma/nvim-yarp'
  Plug 'roxma/vim-hug-neovim-rpc'
endif

call plug#end()

let g:deoplete#enable_at_startup = 1
call deoplete#custom#option('sources', { '_': ['file'] })

" 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

removing source option does not help

:UpdateRemotePlugins shows

remote/host: python3 host registered plugins []
remote/host: generated rplugin manifest: C:\Users\myusername\AppData\Local\nvim-data/rplugin.vim

my C:\Users\myusername\AppData\Local\nvim-data\rplugin.vim

" perl plugins

" node plugins

" python3 plugins

" ruby plugins

How to reproduce the problem from neovim/Vim startup (Required!)

  1. run nvim with minimal init.vim
  2. in status line: "deoplete failed to load. Try the :UpdateR..."
  3. "call deoplete#enable()" shows "Unknown function: _deoplete_init" and lines below
    [deoplete] function deoplete#enable[9]..deoplete#initialize[1]..deoplete#init#_initialize[15]..deoplete#init#_channel, line 31
    [deoplete] deoplete failed to load. Try the :UpdateRemotePlugins command and restart Neovim. See also :checkhealth and :messages output.
  4. I commented out call _deoplete_init() in deoplete.nvim\autoload\deoplete\init.vim, then no error is shown - of course it is not loaded. Then I found this function is defined in rplugin/python3/deoplete/init.py. So I doubt the issue is I cannot install the remote plugin.

Generate a logfile if appropriate

  1. set NVIM_PYTHON_LOG_FILE=/tmp/log
  2. set NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. nvim
  4. auto completion not working
  5. no log files with minimal init.vim and log files are empty with full init.vim
Shougo commented 2 months ago

Sorry. I don't know why it does not work. Because it is neovim remote plugin issue.

You should use ddc.vim instead. Deoplete and remote plugin are deprecated architecture.

Shougo commented 2 months ago

But g:python3_host_prog is really executable? You should check it.

:echo g:python3_host_prog->executable()

Shougo commented 2 months ago

Requirement already satisfied: neovim in d:\apps\python3\lib\site-packages (0.3.1)

This package is conflicted with pynvim. Please remove it.

bon-ami commented 2 months ago

@Shougo , thanks for your quick reply. pip uninstall neovim while keeping pynvim, etc. does not help. Anyway, I'm switching to ddc.vim.

Shougo commented 2 months ago

OK.