Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deoplete-jedi does show proper module completions on import statements like "from x.y" #191

Closed
antonzub1 opened this issue Aug 3, 2018 · 10 comments
Labels

Comments

@antonzub1
Copy link

Problem summary

Deoplete-jedi shows list of all modules on completions like 'from x.y'. Please see example.

Expected

Deoplete-jedi shows completion only for proper modules

Environment Information

  • OS: OSX (also reproduced on Ubuntu 16.04)
  • Neovim version: 0.2.2

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

  1. export NVIM_PYTHON_LOG_FILE=/tmp/nvim-log
  2. export NVIM_PYTHON_LOG_LEVEL=DEBUG
  3. 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)

  1. Open python file
  2. Start typing import as "from tensorflow."

Screen shot (if possible)

Provided in summary

Upload the logfile(s)

https://pastebin.com/yQAT9VX2 - deoplete log

@Shougo
Copy link
Collaborator

Shougo commented Aug 6, 2018

Reproduced. But it is hard to fix for me.

@blueyed Ping. Can you fix the problem?
I think module completion is broken.

@Shougo Shougo added the bug label Aug 6, 2018
@antonzub1
Copy link
Author

@Shougo, thank you very much for your help!

By the way, looks like [RFC] Update Jedi PR fixes this issue - I've tried to reproduce this fix by myself and issue with broken completions disappeared. Hope this will help.

@Shougo Shougo closed this as completed Aug 10, 2018
@Shougo
Copy link
Collaborator

Shougo commented Aug 10, 2018

OK. I have merged it.

@antonzub1
Copy link
Author

@Shougo , could you please reopen this issue? Looks like it still persists after update.

However, I was able to overcome this by updating rplugin/python3/deoplete/sources/deoplete_jedi/server.py as per Update Jedi RFC

@blueyed
Copy link
Collaborator

blueyed commented Aug 10, 2018

@zabulazza

However, I was able to overcome this by updating rplugin/python3/deoplete/sources/deoplete_jedi/server.py as per Update Jedi RFC

Please elaborate.. this PR is merged, i.e. server.py should be the same as from there already in master?!

@blueyed
Copy link
Collaborator

blueyed commented Aug 10, 2018

So maybe you only have to run git submodule update --recursive?

@antonzub1
Copy link
Author

@blueyed, excuse me for confusing you - my previous statement was unclear.

Ok, so basically I had following situation - I have only reproduced fix for server.py (without submodules update) before update deoplete-jedi to last version and everything worked as expected. However, issue with incorrect list of completions still persists after update (even after git submodule update --recursive).

Please, let me know in case if I can help you somehow or if I need provide you an additional information , because I am really interested in this plugin working.

@blueyed
Copy link
Collaborator

blueyed commented Aug 10, 2018

@zabulazza
Then you might want to help debugging/fixing it yourself.. :)

I am not using deoplete/deoplete-jedi by default myself currently, but rather jedi-vim and only enable deoplete manually.. it is too much overhead and subtle bugs for me.

My last WIP for deoplete-jedi was to use Jedi more directly (#184), but I think it needs the caching still (because deoplete is calling it so often).

I suggest:

  1. trying if updating the submodules to latest jedi/parso helps for deoplete-jedi already.
  2. otherwise you could try if jedi-vim (use its Ctrl-x Ctrl-o) shows the same issue.
  3. try [WIP/RFC] Only use Jedi, without worker/client/server/cache #184 (and maybe up the submodules in there, too).

@Shougo Shougo reopened this Aug 13, 2018
@Shougo
Copy link
Collaborator

Shougo commented Aug 13, 2018

OK. Reopened.

@Shougo
Copy link
Collaborator

Shougo commented Aug 16, 2018

#184 fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants