mirror of
https://github.com/dense-analysis/ale.git
synced 2025-12-29 07:16:53 +08:00
Fix javalsp command.
The command used to invoke the LSP process was being escaped wrong. Also added a new option to set a different java executable and fixed the documentation.
This commit is contained in:
@@ -2,15 +2,17 @@
|
||||
" Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac
|
||||
|
||||
call ale#Set('java_javalsp_jar', 'javacs.jar')
|
||||
call ale#Set('java_javalsp_executable', 'java')
|
||||
|
||||
function! ale_linters#java#javalsp#Executable(buffer) abort
|
||||
return 'java'
|
||||
return ale#Var(a:buffer, 'java_javalsp_executable')
|
||||
endfunction
|
||||
|
||||
function! ale_linters#java#javalsp#Command(buffer) abort
|
||||
let l:jar = ale#Var(a:buffer, 'java_javalsp_jar')
|
||||
let l:executable = ale_linters#java#javalsp#Executable(a:buffer)
|
||||
|
||||
return ale#Escape('java -cp ' . l:jar . ' -Xverify:none org.javacs.Main')
|
||||
return ale#Escape(l:executable) . ' -cp ' . l:jar . ' -Xverify:none org.javacs.Main'
|
||||
endfunction
|
||||
|
||||
call ale#linter#Define('java', {
|
||||
|
||||
Reference in New Issue
Block a user