Add tern for smart JavaScript completion and configure mucomplete to work well with it

This commit is contained in:
Danielle McLean 2018-04-19 09:34:43 +10:00
parent 5355b4027b
commit d1f0e233b2
Signed by: 00dani
GPG key ID: 8EB789DDF3ABD240
2 changed files with 15 additions and 0 deletions

View file

@ -47,6 +47,7 @@ endif
inoremap jj <Esc> inoremap jj <Esc>
nnoremap <C-t> :Files<CR> nnoremap <C-t> :Files<CR>
if exists('+belloff') if exists('+belloff')
set belloff+=ctrlg set belloff+=ctrlg
endif endif
@ -83,3 +84,14 @@ endif
let g:airline_powerline_fonts = 1 let g:airline_powerline_fonts = 1
let g:LatexBox_Folding = 1 let g:LatexBox_Folding = 1
let g:NERDTreeHijackNetrw = 1 let g:NERDTreeHijackNetrw = 1
let g:mucomplete#can_complete = {
\'default': {
\'omni': {t -> strlen(&l:omnifunc) > 0 && t =~# '\m\k\%(\k\|\.\)$'}
\}
\}
" For lifepillar/vim-mucomplete and tpope/vim-endwise to play well together,
" this mapping is required. :he mucomplete-compatibility
imap <Plug>MyCR <Plug>(MUcompleteCR)
imap <cr> <Plug>MyCR

View file

@ -39,6 +39,7 @@ endif
call Plug('k-takata/minpac', {'type': 'opt'}) call Plug('k-takata/minpac', {'type': 'opt'})
call Plug('tpope/vim-sensible') call Plug('tpope/vim-sensible')
call Plug('prabirshrestha/async.vim')
call Plug('ciaranm/inkpot', {'type': 'opt', 'do': 'colorscheme inkpot'}) call Plug('ciaranm/inkpot', {'type': 'opt', 'do': 'colorscheme inkpot'})
call Plug('morhetz/gruvbox', {'type': 'opt'}) call Plug('morhetz/gruvbox', {'type': 'opt'})
@ -73,6 +74,8 @@ call Plug('sukima/xmledit')
call Plug('lepture/vim-jinja') call Plug('lepture/vim-jinja')
call Plug('ternjs/tern_for_vim', {'do': {-> async#job#start(['npm', 'install'], {})}})
call Plug('alx741/yesod.vim') call Plug('alx741/yesod.vim')
call Plug('pbrisbin/vim-syntax-shakespeare') call Plug('pbrisbin/vim-syntax-shakespeare')