diff options
author | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-06-07 09:26:06 +0200 |
---|---|---|
committer | Bartek thindil Jasicki <thindil@laeran.pl> | 2020-06-07 09:26:06 +0200 |
commit | a5e7f2c8bb61f3e882bc26ce1773b130d1fbc32b (patch) | |
tree | cb85bc818b667acc9b28870755e079e20b935a3f /ale_linters/java/eclipselsp.vim | |
parent | b6828ac5c54c809336b5314e51f185124d90b23f (diff) | |
parent | 7265ceb6d050d1a4642741d248f11e4f2abd37e1 (diff) | |
download | ale-a5e7f2c8bb61f3e882bc26ce1773b130d1fbc32b.zip |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'ale_linters/java/eclipselsp.vim')
-rw-r--r-- | ale_linters/java/eclipselsp.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ale_linters/java/eclipselsp.vim b/ale_linters/java/eclipselsp.vim index 2648893b..2bfec043 100644 --- a/ale_linters/java/eclipselsp.vim +++ b/ale_linters/java/eclipselsp.vim @@ -7,6 +7,7 @@ call ale#Set('java_eclipselsp_path', ale#path#Simplify($HOME . '/eclipse.jdt.ls' call ale#Set('java_eclipselsp_config_path', '') call ale#Set('java_eclipselsp_workspace_path', '') call ale#Set('java_eclipselsp_executable', 'java') +call ale#Set('java_eclipselsp_javaagent', '') function! ale_linters#java#eclipselsp#Executable(buffer) abort return ale#Var(a:buffer, 'java_eclipselsp_executable') @@ -100,12 +101,30 @@ function! ale_linters#java#eclipselsp#WorkspacePath(buffer) abort return ale#path#Dirname(ale#java#FindProjectRoot(a:buffer)) endfunction +function! ale_linters#java#eclipselsp#Javaagent(buffer) abort + let l:rets = [] + let l:raw = ale#Var(a:buffer, 'java_eclipselsp_javaagent') + + if empty(l:raw) + return '' + endif + + let l:jars = split(l:raw) + + for l:jar in l:jars + call add(l:rets, ale#Escape('-javaagent:' . l:jar)) + endfor + + return join(l:rets, ' ') +endfunction + function! ale_linters#java#eclipselsp#Command(buffer, version) abort let l:path = ale#Var(a:buffer, 'java_eclipselsp_path') let l:executable = ale_linters#java#eclipselsp#Executable(a:buffer) let l:cmd = [ ale#Escape(l:executable), + \ ale_linters#java#eclipselsp#Javaagent(a:buffer), \ '-Declipse.application=org.eclipse.jdt.ls.core.id1', \ '-Dosgi.bundles.defaultStartLevel=4', \ '-Declipse.product=org.eclipse.jdt.ls.core.product', |