summaryrefslogtreecommitdiff
path: root/ale_linters/java
diff options
context:
space:
mode:
authorNiBo <nibocn@gmail.com>2020-08-13 23:12:12 +0800
committerNiBo <nibocn@gmail.com>2020-08-13 23:12:12 +0800
commita4f70163eb8e8b8f5ab670b793d3f0e69fc99579 (patch)
treee67de9117409ba89b545f921f9321661dc9eb7db /ale_linters/java
parent0b7776633764ab4a3c25b73e8ef8a604bebdd638 (diff)
downloadale-a4f70163eb8e8b8f5ab670b793d3f0e69fc99579.zip
fix(eclipselsp): Get jar file path failed
Error: Unable to access jarfile
Diffstat (limited to 'ale_linters/java')
-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