From 3e808594923495103aa38a7ff2b6b6d1f24d8104 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Thu, 31 Aug 2023 00:46:15 +0800 Subject: Try mucomplete with jedi-vim --- .vim/after/plugin/asyncomplete.vim | 2 ++ .vim/after/plugin/jedi.vim | 19 +++++++++++++++++++ .vim/after/plugin/minpac.vim | 1 + .vim/after/plugin/mucomplete.vim | 2 -- 4 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 .vim/after/plugin/jedi.vim (limited to '.vim/after/plugin') 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 pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" inoremap pumvisible() ? "\" : "\" 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 rn :call jedi#rename() + nnoremap gd :call jedi#goto() + nnoremap gr :call jedi#usages() + nnoremap gy :call jedi#goto_stubs() + nnoremap K :call jedi#show_documentation() + + 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 -- cgit v1.2.3