diff options
-rw-r--r-- | .vim/after/plugin/asyncomplete.vim | 2 | ||||
-rw-r--r-- | .vim/after/plugin/jedi.vim | 19 | ||||
-rw-r--r-- | .vim/after/plugin/minpac.vim | 1 | ||||
-rw-r--r-- | .vim/after/plugin/mucomplete.vim | 2 |
4 files changed, 22 insertions, 2 deletions
diff --git a/.vim/after/plugin/asyncomplete.vim b/.vim/after/plugin/asyncomplete.vim index 7eda153..7a2d7ed 100644 --- a/.vim/after/plugin/asyncomplete.vim +++ b/.vim/after/plugin/asyncomplete.vim @@ -2,6 +2,8 @@ if has('nvim') finish endif +finish + inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>" inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>" inoremap <expr> <cr> pumvisible() ? "\<c-y>" : "\<cr>" diff --git a/.vim/after/plugin/jedi.vim b/.vim/after/plugin/jedi.vim new file mode 100644 index 0000000..4e0f062 --- /dev/null +++ b/.vim/after/plugin/jedi.vim @@ -0,0 +1,19 @@ +let g:jedi#auto_initialization = 0 +let g:jedi#auto_vim_configuration = 0 +let g:jedi#show_call_signatures = 1 + +function! s:on_python_filetype() abort + packadd jedi-vim + + setlocal omnifunc=jedi#completions + + nnoremap <silent> <buffer> <localleader>rn :call jedi#rename()<cr> + nnoremap <silent> <buffer> gd :call jedi#goto()<cr> + nnoremap <silent> <buffer> gr :call jedi#usages()<cr> + nnoremap <silent> <buffer> gy :call jedi#goto_stubs()<cr> + nnoremap <silent> <buffer> K :call jedi#show_documentation()<cr> + + call jedi#configure_call_signatures() +endfunction + +autocmd FileType python call s:on_python_filetype() diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index 2d807a3..61728b6 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -121,6 +121,7 @@ function! InitMinpac() abort call minpac#add('https://github.com/iamcco/markdown-preview.nvim', { \ 'type': 'start', \ 'do': 'packloadall! | call mkdp#util#install()'}) + call minpac#add('https://github.com/davidhalter/jedi-vim', {'type': 'opt'}) " misc call minpac#add('https://github.com/freitass/todo.txt-vim.git', {'type': 'opt'}) diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim index 5a756f4..81751ba 100644 --- a/.vim/after/plugin/mucomplete.vim +++ b/.vim/after/plugin/mucomplete.vim @@ -2,8 +2,6 @@ if has('nvim') finish endif -finish " Try using deoplete - let g:mucomplete#enable_auto_at_startup = 1 let g:mucomplete#minimum_prefix_length = 1 let g:mucomplete#empty_text_auto = 1 |