adding java completion

master
tiynger 5 years ago
parent 4ebce327f9
commit 8cbc6923a0

@ -1,5 +1,3 @@
let mapleader =","
if ! filereadable(expand('~/.config/nvim/autoload/plug.vim'))
echo "Downloading junegunn/vim-plug to manage plugins..."
silent !mkdir -p ~/.config/nvim/autoload/
@ -32,7 +30,33 @@ set clipboard=unnamedplus
" Plugin section
call plug#begin('~/.config/nvim/plugged')
Plug 'donRaphaco/neotex', { 'for': 'tex'}
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'lervag/vimtex', {'for': 'tex'}
"Plug 'artur-shaik/vim-javacomplete2'
call plug#end()
" neotex
let g:neotex_enabled = 2
let g:neotex_pdflatex_alternative = 'xelatex'
" deoplete
let g:deoplete#enable_at_startup = 1
let g:deoplete#enable_smart_case = 1
let g:deoplete#sources = {}
let g:deoplete#sources.java = ['jc', 'javacomplete2', 'file', 'buffer']
call deoplete#custom#var('omni', 'input_patterns', {
\ 'tex': g:vimtex#re#deoplete
\})
"tab as remapping for deoplete
inoremap <silent><expr> <TAB>
\ pumvisible() ? "\<C-n>" :
\ <SID>check_back_space() ? "\<TAB>" :
\ deoplete#mappings#manual_complete()
function! s:check_back_space() abort "" {{{
let col = col('.') - 1
return !col || getline('.')[col - 1] =~ '\s'
endfunction "" }}}
" javacomplete2
"autocmd FileType java setlocal omnifunc=vim-javacomplete2#Complete

Loading…
Cancel
Save