From a51e3655a2637ca4ba0204b8d8d01b66113ff272 Mon Sep 17 00:00:00 2001 From: ViViDboarder Date: Tue, 30 May 2017 14:10:55 -0700 Subject: [PATCH] Improve deoplete and python loading --- vim/rc/plugins.rc.vim | 2 +- vim/rc/plugins/deoplete.rc.vim | 7 ++++--- vim/rc/plugins/python.rc.vim | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/vim/rc/plugins.rc.vim b/vim/rc/plugins.rc.vim index 87428f5..f2a6bcb 100644 --- a/vim/rc/plugins.rc.vim +++ b/vim/rc/plugins.rc.vim @@ -75,7 +75,7 @@ Plug 'avakhov/vim-yaml' Plug 'cespare/vim-toml' Plug 'dag/vim-fish' Plug 'dart-lang/dart-vim-plugin' -Plug 'fatih/vim-go' +Plug 'fatih/vim-go', { 'do': ':GoInstallBinaries' } Plug 'groovy.vim' Plug 'hsanson/vim-android' Plug 'pangloss/vim-javascript' diff --git a/vim/rc/plugins/deoplete.rc.vim b/vim/rc/plugins/deoplete.rc.vim index 8673aed..fd7c92c 100644 --- a/vim/rc/plugins/deoplete.rc.vim +++ b/vim/rc/plugins/deoplete.rc.vim @@ -2,8 +2,8 @@ Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' } Plug 'Shougo/neoinclude.vim' Plug 'Shougo/neco-syntax' -Plug 'zchee/deoplete-jedi' -Plug 'zchee/deoplete-go' +Plug 'zchee/deoplete-jedi', { 'for': 'python' } +Plug 'zchee/deoplete-go', { 'do': 'make' } inoremap pumvisible() ? "\" : deoplete#mappings#manual_complete() inoremap pumvisible() ? "\" : deoplete#mappings#manual_complete() @@ -20,11 +20,12 @@ endif " Set allowed sources let g:deoplete#sources._ = ['buffer', 'member', 'file', 'tag'] ", 'omni'] +let g:deoplete#sources.go = ['buffer', 'member', 'file', 'omni'] let g:deoplete#sources.python = ['buffer', 'member', 'file', 'omni'] " Set default keyword pattern (vim regex) let g:deoplete#keyword_patterns['default'] = '\h\w*' " Set omni patters for deoplete (python3 regex) -let g:deoplete#omni#input_patterns.go = '[^.[:digit:] *\t]\%(\.\|->\)' +let g:deoplete#omni#input_patterns.go = '([^. \t](\.|->))\w*' let g:deoplete#omni#input_patterns.python = '([^. \t]\.|^\s*@|^\s*from\s.+ import |^\s*from |^\s*import )\w*' " Default settings diff --git a/vim/rc/plugins/python.rc.vim b/vim/rc/plugins/python.rc.vim index 1d31486..352a205 100644 --- a/vim/rc/plugins/python.rc.vim +++ b/vim/rc/plugins/python.rc.vim @@ -1,12 +1,12 @@ " All Python plugins and settings -Plug 'alfredodeza/coveragepy.vim' -Plug 'alfredodeza/pytest.vim' +Plug 'alfredodeza/coveragepy.vim', { 'for': 'python' } +Plug 'alfredodeza/pytest.vim', { 'for': 'python' } " pytest.vim {{ nmap ptp :Pytest project nmap ptf :Pytest file nmap ptm :Pytest method " }} pytest.vim -Plug 'davidhalter/jedi-vim' +Plug 'davidhalter/jedi-vim', { 'for': 'python' } " jedi-vim {{ let g:jedi#auto_vim_configuration = 0 let g:jedi#completions_enabled = 0