From b35afc843096bbfc0c5fa1f8b2afb9d32a5f22ec Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Wed, 4 Mar 2020 17:15:55 +0100 Subject: [PATCH] Add java support - Add java complete package and shortcuts to handle imports - Enable smart case for deoplete --- init.vim | 18 ++++++++++++++++++ plugins.vim | 2 ++ 2 files changed, 20 insertions(+) diff --git a/init.vim b/init.vim index ff6dcd8..fd7e77d 100644 --- a/init.vim +++ b/init.vim @@ -94,6 +94,7 @@ let g:clang_compilation_database = '.' let g:python3_host_prog = '/usr/bin/python3' " deoplete requires huge startuptime. Delay loading upon first InsertEnter. let g:deoplete#enable_at_startup = 0 +let g:deoplete#enable_smart_case = 1 autocmd InsertEnter * call deoplete#enable() "augroup pencil @@ -137,6 +138,23 @@ au Filetype mail syn match Statement /^\s*-*\s*8<\s*-*\s*$/ " Line wrap crippled with numbers shown au Filetype man set nonumber +" Java completion +au FileType java setlocal omnifunc=javacomplete#Complete +au FileType java JCEnable +" See https://github.com/artur-shaik/vim-Javacomplete2 +" ji ji +nmap (JavaComplete-Imports-AddSmart) +imap (JavaComplete-Imports-AddSmart) +" ii jii +nmap (JavaComplete-Imports-Add) +imap (JavaComplete-Imports-Add) +" I jI +nmap (JavaComplete-Imports-AddMissing) +imap (JavaComplete-Imports-AddMissing) +" R jR +nmap (JavaComplete-Imports-RemoveUnused) +imap (JavaComplete-Imports-RemoveUnused) + """""""""""""""""""""""""""""""""""""""""""""""""""""""""""" " Some plugin-specific settings diff --git a/plugins.vim b/plugins.vim index 43f9163..2b36d0a 100644 --- a/plugins.vim +++ b/plugins.vim @@ -55,6 +55,8 @@ Plug 'derekwyatt/vim-fswitch', {'for': ['c', 'cpp', 'objc']} Plug 'ludovicchabant/vim-gutentags', {'for': ['c', 'cpp', 'objc']} "Plug 'vim-scripts/Conque-GDB', {'for': ['c', 'cpp', 'objc']} +Plug 'artur-shaik/vim-javacomplete2', {'for': 'java'} + Plug 'godlygeek/tabular' Plug 'junegunn/vim-easy-align' -- 2.39.5