pappasam / coc-jedi

coc.nvim wrapper for https://github.com/pappasam/jedi-language-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No completion for numpy

astier opened this issue · comments

Minimal vimrc

call plug#begin($XDG_DATA_HOME.'/nvim/plugins')
    Plug 'neoclide/coc.nvim', { 'branch': 'release' }
call plug#end()
let g:coc_global_extensions = ['coc-jedi']

Steps to reproduce

  1. nvim bug.py
  2. Enter instertmode
  3. Type import nu

numpy is not shown in the completion-menu.

Expected behavior

numpy should show up in the completion-list if import nu is typed.

Questions to help us debug:

  • Which Python version / distribution are you using? 3.8, conda, etc?
  • Do you have numpy installed in that distribution?

Also, see this issue: pappasam/jedi-language-server#27 Maybe you can find a work-around (if necessary) there?

I reinstalled everything from again and it works now. Thank you.

I was wrong. I still had the issue. I just forgot to uninstall coc-python which completed numpy. After uninstalling coc-python the bug appeared again. Installing jedi-language-server manually with pip and setting

"jedi.executable.command": "~/.local/bin/jedi-language-server"

solved the issue for me.

I am using arch-linux and installed numpy from the arch repos. It seems like coc-jedi is not able to find it. My python-version is 3.8.5.

#4 seems to be related.

Yep, jedi tries to be smart about figuring out your environment, but given the diversity of Python environments, somethings you just have to manage the jedi / jedi-language-server installation yourself (and put it in the same environment as your dependencies). Glad we figured out a solution for you and hopefully Jedi keeps getting smarter over time!

So its an issue of jedi and not coc-jedi?

That's what I suspect, but I'm not certain either way at present.

Should we reopen this issue or do you want to leave it at that?

Let's leave this closed. Other open issues address the underlying problem and I've updated the readme to document the current workaround: https://github.com/pappasam/coc-jedi#no-completion--goto-definition-while-using-conda-homebrew-asdf-etc