From e2069051238bbd364683956488a6b7f5b19aa3c8 Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Tue, 16 Apr 2024 12:29:05 +0200 Subject: [PATCH] lombok --- vim/.vim/ycm_extra_conf.py | 20 ++++++++++++++++++++ vim/.vimrc | 4 ++-- 2 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 vim/.vim/ycm_extra_conf.py diff --git a/vim/.vim/ycm_extra_conf.py b/vim/.vim/ycm_extra_conf.py new file mode 100644 index 0000000..1a61c1d --- /dev/null +++ b/vim/.vim/ycm_extra_conf.py @@ -0,0 +1,20 @@ +import os + +PATH_TO_LOMBOK = os.path.expanduser("/usr/lib/lombok-common/lombok.jar") +jdtls_args = ['-noverify', + '-Xmx1G', + '-XX:+UseG1GC', + '-XX:+UseStringDeduplication'] + +def Settings( **kwargs ): + if not os.path.exists(PATH_TO_LOMBOK): + raise RuntimeError("Didn't find lombok jar") + if kwargs['language'] == 'java': + return { + 'server': { + 'jvm_args': [ + '-javaagent:' + PATH_TO_LOMBOK, + '-Xbootclasspath/a:' + PATH_TO_LOMBOK + ] + jdtls_args + } + } diff --git a/vim/.vimrc b/vim/.vimrc index 03799f2..e1cf6f5 100644 --- a/vim/.vimrc +++ b/vim/.vimrc @@ -26,7 +26,7 @@ let g:vimtex_view_method = 'zathura' nnoremap gd :YcmCompleter GoToDefinition nnoremap gr :YcmCompleter GoToReferences nnoremap K :YcmCompleter GetDoc -nnoremap :YcmCompleter FixIt +nnoremap :YcmCompleter FixIt noremap gN :Lex nnoremap :Make @@ -62,7 +62,7 @@ let g:cpp_attributes_highlight = 1 let g:ycm_always_populate_location_list = 1 let g:ycm_goto_buffer_command = "'split-or-existing-window'" -let g:ycm_java_binary_path = "/usr/lib/jvm/java-17-openjdk/bin/java" +let g:ycm_global_ycm_extra_conf = '~/.vim/ycm_extra_conf.py' let g:ycm_language_server = [ \ { \ 'name': 'tex',