No completion suggestions from external modules
Hello,
I get no autocompletion popup from external modules.
Strangely, as you can see, we get the numpy.array docstring when we enter the parenthesis. Here's my .vimrc:
syntax on
set encoding=utf-8
set number
set ruler
set wrap
set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
set noshiftround
set laststatus=2
set showmode
set showcmd
set ignorecase
set showmatch
filetype plugin on
" Load plugins
call plug#begin()
Plug 'FooSoft/vim-argwrap'
Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-fugitive'
Plug 'bfichera/minimal-vimwiki'
Plug 'bfichera/vimwiki-git'
Plug 'prabirshrestha/vim-lsp'
Plug 'hrsh7th/vim-vsnip'
Plug 'hrsh7th/vim-vsnip-integ'
Plug 'prabirshrestha/asyncomplete.vim'
Plug 'prabirshrestha/asyncomplete-lsp.vim'
Plug 'dense-analysis/ale'
call plug#end()
filetype indent off
let mapleader = ";"
" custom remaps
nnoremap ,<space> :new <bar> Explore <CR>
nnoremap .<space> :Vexplore <CR>
nnoremap ,d :r! date -Iseconds<CR>
nnoremap <leader>t :term bash<CR><C-w>J<C-w>k15<C-w>+<C-w>j
nnoremap <leader>+ 15<C-w>+
map <leader><space> :let @/="<cr>" clear search
" colors
colorscheme jellybeans
" vim-airline
let g:airline_powerline_fonts = 1
" minimal-vimwiki
let g:vimwiki_list = [{"path": "~/vimwiki/", "syntax": "markdown", "ext": "md"}]
let g:vimwiki_global_ext = 0
" vim-argwrap
let g:argwrap_tail_comma = 1
nnoremap ,a :ArgWrap<CR>
" vim-lsp
let g:lsp_diagnostics_enabled = 0
let g:lsp_log_verbose = 1
let g:lsp_document_code_action_signs_enabled = 0
if executable("jedi-language-server")
au User lsp_setup call lsp#register_server({
\ "name": "jedi-language-server",
\ "cmd": {server_info->["jedi-language-server"]},
\ "allowlist": ["python"],
\ "initialization_options": {"jediSettings": {"debug": 1, "caseInsensitiveCompletion": 0, "hover": {"enable": 0}}},
\ })
endif
let g:lsp_log_file = "vim-lsp.log"
" asyncomplete
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? asyncomplete#close_popup() . "\<cr>" : "\<cr>"
let g:asyncomplete_log_file = "asyncomplete.log"
" vim-vsnip
imap <expr> <C-l> vsnip#jumpable(1) ? "<Plug>(vsnip-jump-next)" : "<C-l>"
smap <expr> <C-l> vsnip#jumpable(1) ? "<Plug>(vsnip-jump-next)" : "<C-l>"
imap <expr> <C-h> vsnip#jumpable(-1) ? "<Plug>(vsnip-jump-prev)" : "<C-h>"
smap <expr> <C-h> vsnip#jumpable(-1) ? "<Plug>(vsnip-jump-prev)" : "<C-h>"
" ale
let g:ale_linters_explicit = 1
let g:ale_linters = {"python": ["flake8"]}
let g:ale_disable_lsp = 1
Here is the lsp and asyncomplete logs from the gif: asyncomplete.log vim-lsp.log
bfichera@CSI361904 /Users/bfichera $ jedi-language-server --version
0.41.4
seems to me that this happens for numpy but not for other modules I tried. Almost certainly wants reporting to jedi rather than here.
My guess would be that it is deliberate, per this, but I might be barking up the wrong tree
Might be connected to https://github.com/davidhalter/jedi/issues/2020
But I personally don't understand the original issue. This is a classical case of "here's a screenshot, there's something wrong". Please write down your code and tell us what's working and what's not. An additional screenshot is nice, but I don't want to interpret it without a proper description.
My interpretation was that "there are no suggestions on typing np.", which I reproduce. The rest I ignore as noise, I agree that better issue reports would be better!