summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHoracio Sanson <hsanson@gmail.com>2020-08-14 13:49:09 +0900
committerGitHub <noreply@github.com>2020-08-14 13:49:09 +0900
commit5ceda0164c5fae0d61fd51d4c9e083b27abdc9d2 (patch)
tree352756371f0d725d9e7dae80a5fec3ea656aeae2
parent5a4fad6172472fd2cc316ff72b827ed726e69a5b (diff)
parenta4f70163eb8e8b8f5ab670b793d3f0e69fc99579 (diff)
downloadale-5ceda0164c5fae0d61fd51d4c9e083b27abdc9d2.zip
Merge pull request #3288 from nibocn/master
fix(eclipselsp): Get jar file path failed
-rw-r--r--ale_linters/java/eclipselsp.vim13
1 files changed, 10 insertions, 3 deletions
diff --git a/ale_linters/java/eclipselsp.vim b/ale_linters/java/eclipselsp.vim
index c981b749..8bc09039 100644
--- a/ale_linters/java/eclipselsp.vim
+++ b/ale_linters/java/eclipselsp.vim
@@ -31,21 +31,28 @@ function! ale_linters#java#eclipselsp#JarPath(buffer) abort
" Search jar file within repository path when manually built using mvn
let l:files = globpath(l:path, '**/'.l:platform.'/**/plugins/org.eclipse.equinox.launcher_\d\.\d\.\d\d\d\.*\.jar', 1, 1)
- if len(l:files) > 1
+ if len(l:files) >= 1
return l:files[0]
endif
" Search jar file within VSCode extensions folder.
let l:files = globpath(l:path, '**/'.l:platform.'/plugins/org.eclipse.equinox.launcher_\d\.\d\.\d\d\d\.*\.jar', 1, 1)
- if len(l:files) > 1
+ if len(l:files) >= 1
+ return l:files[0]
+ endif
+
+ " Search jar file within unzipped tar.gz file
+ let l:files = globpath(l:path, 'plugins/org.eclipse.equinox.launcher_\d\.\d\.\d\d\d\.*\.jar', 1, 1)
+
+ if len(l:files) >= 1
return l:files[0]
endif
" Search jar file within system package path
let l:files = globpath('/usr/share/java/jdtls/plugins', 'org.eclipse.equinox.launcher_\d\.\d\.\d\d\d\.*\.jar', 1, 1)
- if len(l:files) > 1
+ if len(l:files) >= 1
return l:files[0]
endif