Shougo / neocomplete.vim

Next generation completion framework after neocomplcache
2.74k stars 206 forks source link

Python completion - Feature request #598

Closed duytrung closed 7 years ago

duytrung commented 7 years ago

Problems summary

I'm learning to use Vim/neovim for fun of python programming. I found that it does not show python api completion.

Expected

Cache a full list of python api/method for completion

Environment Information

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

set nocompatible
syntax on
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin

set diffexpr=MyDiff()
function MyDiff()
  let opt = '-a --binary '
  if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
  if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
  let arg1 = v:fname_in
  if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
  let arg2 = v:fname_new
  if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
  let arg3 = v:fname_out
  if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
  let eq = ''
  if $VIMRUNTIME =~ ' '
    if &sh =~ '\<cmd'
      let cmd = '""' . $VIMRUNTIME . '\diff"'
      let eq = '"'
    else
      let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
    endif
  else
    let cmd = $VIMRUNTIME . '\diff'
  endif
  silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction

" Specify a directory for plugins
" - For Neovim: ~/.local/share/nvim/plugged
" - Avoid using standard Vim directory names like 'plugin'
call plug#begin('~/.vim/plugged')

" Make sure you use single quotes
" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'

" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'

" Multiple Plug commands can be written in a single line using | separators
Plug 'SirVer/ultisnips' | " Plug 'honza/vim-snippets'

" On-demand loading
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }
" Plug 'tpope/vim-vinegar'
" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }
Plug 'rking/ag.vim'

" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }

" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }

" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

" Unmanaged plugin (manually installed and updated)
Plug '~/my-prototype-plugin'

" Make sure you use single quotes

" Shorthand notation; fetches https://github.com/junegunn/vim-easy-align
Plug 'junegunn/vim-easy-align'

" Any valid git URL is allowed
Plug 'https://github.com/junegunn/vim-github-dashboard.git'

" Multiple Plug commands can be written in a single line using | separators
" Plug 'SirVer/ultisnips' 
Plug 'honza/vim-snippets'

" On-demand loading
Plug 'scrooloose/nerdtree', { 'on':  'NERDTreeToggle' }
Plug 'tpope/vim-fireplace', { 'for': 'clojure' }

" Using a non-master branch
Plug 'rdnetto/YCM-Generator', { 'branch': 'stable' }

" Using a tagged release; wildcard allowed (requires git 1.9.2 or above)
Plug 'fatih/vim-go', { 'tag': '*' }

" Plugin options
Plug 'nsf/gocode', { 'tag': 'v.20150303', 'rtp': 'vim' }

" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }

Plug 'mattn/emmet-vim'
Plug 'valloric/youcompleteme'
Plug 'shougo/deoplete.nvim'
Plug 'shougo/neocomplete.vim'
Plug 'shougo/neocomplcache.vim'
Plug 'christoomey/vim-tmux-navigator'
Plug 'scrooloose/nerdtree'
Plug 'tpope/vim-sensible'
Plug 'tpope/vim-abolish'

Plug 'sjl/gundo.vim'

Plug 'jiangmiao/auto-pairs'
Plug 'garbas/vim-snipmate'
Plug 'raimondi/delimitmate'
Plug 'davidhalter/jedi-vim'
Plug 'ervandew/supertab'
Plug 'honza/vim-snippets'
Plug 'yggdroot/indentline'
Plug 'flazz/vim-colorschemes'
Plug 'nathanaelkane/vim-indent-guides'
Plug 'godlygeek/tabular'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-fugitive'
Plug 'powerline/powerline'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'vim-airline/vim-airline'
Plug 'airblade/vim-gitgutter'
Plug 'bling/vim-airline'
Plug 'terryma/vim-multiple-cursors'
Plug 'easymotion/vim-easymotion'
Plug 'tpope/vim-surround'
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdcommenter'
Plug 'tpope/vim-rails'
Plug 'plasticboy/vim-markdown'
Plug 'klen/python-mode'
Plug 'hynek/vim-python-pep8-indent'
Plug 'myusuf3/numbers.vim'

" Initialize plugin system
call plug#end()

The reproduce ways from Vim starting (Required!)

  1. foo
  2. bar
  3. baz

Screen shot (if possible)

Upload the log messages by :redir and :message

Shougo commented 7 years ago

I don't understand your problem. We have not ESP skills.

Shougo commented 7 years ago

OH, you have installed multiple auto completion plugins.

youcompleteme, neocomplcache, neocomplete, deoplete. You should not mix them. They conflicts.

My recommendation is deoplete.nvim + deoplete-jedi.

dfee commented 7 years ago

@Shougo I've just found this. Your recommendation is for deoplete, but that's neovim, not vim8. Did you intend to recommend: neocomplete, jedi-vim?

Shougo commented 7 years ago

@Shougo I've just found this. Your recommendation is for deoplete, but that's neovim, not vim8. Did you intend to recommend: neocomplete, jedi-vim?

What is your issue? Yes, neocomplete and jedi-vim works. My recommendation is deoplete + deoplete-jedi though.