mirror of
https://github.com/amix/vimrc
synced 2025-07-12 14:15:00 +08:00
Updated plugins
This commit is contained in:
@ -17,7 +17,6 @@ function! ale#maven#FindProjectRoot(buffer) abort
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
|
||||
" Given a buffer number, find the path to the executable.
|
||||
" First search on the path for 'mvnw' (mvnw.cmd on Windows), if nothing is found,
|
||||
" try the global command. Returns an empty string if cannot find the executable.
|
||||
@ -25,7 +24,7 @@ function! ale#maven#FindExecutable(buffer) abort
|
||||
let l:wrapper_cmd = has('unix') ? 'mvnw' : 'mvnw.cmd'
|
||||
let l:wrapper_path = ale#path#FindNearestFile(a:buffer, l:wrapper_cmd)
|
||||
|
||||
if executable(l:wrapper_path)
|
||||
if !empty(l:wrapper_path) && executable(l:wrapper_path)
|
||||
return l:wrapper_path
|
||||
endif
|
||||
|
||||
@ -36,16 +35,23 @@ function! ale#maven#FindExecutable(buffer) abort
|
||||
return ''
|
||||
endfunction
|
||||
|
||||
" Given a buffer number, build a command to print the classpath of the root
|
||||
" project. Returns an empty string if cannot build the command.
|
||||
" Given a buffer number, get a working directory and command to print the
|
||||
" classpath of the root project.
|
||||
"
|
||||
" Returns an empty string for the command if Maven is not detected.
|
||||
function! ale#maven#BuildClasspathCommand(buffer) abort
|
||||
let l:executable = ale#maven#FindExecutable(a:buffer)
|
||||
let l:project_root = ale#maven#FindProjectRoot(a:buffer)
|
||||
|
||||
if !empty(l:executable) && !empty(l:project_root)
|
||||
return ale#path#CdString(l:project_root)
|
||||
\ . l:executable . ' dependency:build-classpath'
|
||||
if !empty(l:executable)
|
||||
let l:project_root = ale#maven#FindProjectRoot(a:buffer)
|
||||
|
||||
if !empty(l:project_root)
|
||||
return [
|
||||
\ l:project_root,
|
||||
\ ale#Escape(l:executable) . ' dependency:build-classpath'
|
||||
\]
|
||||
endif
|
||||
endif
|
||||
|
||||
return ''
|
||||
return ['', '']
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user