deoplete-jedi: Jedi doesn't trigger on `from X import Y` reliably
Problem summary
When editing a Python file and typing from X import (where X is some module), Deoplete offers no jedi completions for the object Y being imported from module X.
Expected
Typing from X import | (where | is the cursor) should offer completions for objects inside module X at |.
Environment Information
- OS: Arch Linux
- Neovim version: v0.2.0
Provide a minimal init.vim with less than 50 lines (required)
" Use the following as a template.
set runtimepath+=~/path/to/deoplete.nvim/
set runtimepath+=~/path/to/deoplete-jedi/
let g:deoplete#enable_at_startup = 1
call deoplete#custom#set('jedi', 'debug_enabled', 1)
call deoplete#enable_logging('DEBUG', '/tmp/deoplete.log')
Generate logfiles if appropriate
- export NVIM_PYTHON_LOG_FILE=/tmp/nvim-log
- export NVIM_PYTHON_LOG_LEVEL=DEBUG
- nvim -u minimal.vimrc
Then look at and attach the files /tmp/nvim-log_{PID} and
/tmp/deoplete.log here.
Steps to reproduce the issue after starting Neovim (required)
- Open a Python file
- Type
from multiprocessing import(or any other module instead ofmultiprocessing) - Observe that Deoplete’s only completion is
import - Backspace to place the cursor as
from multiprocessing import| - Wait a few seconds
- Press
spaceand note that Deoplete now correctly suggests completions from jedi
Screen shot (if possible)
Observed Behavior:

Expected Behavior (obtained via steps 4-6 in the above reproduction procedure):

Upload the logfile(s)
Additional Notes
I considered that this could be happening because of the time required for jedi to gather candidates. This could still be the cause, but I think it isn’t likely to be because this behavior is consistently observed for even trivially small modules (i.e. not something huge like numpy).
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 16 (2 by maintainers)
OK. I will merge it.
@novelview9 Please test #130.
I agree, the fix is working perfectly. Thank you! Closing.