This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
ale/ale_linters/java/javalsp.vim

24 lines
839 B
VimL
Raw Normal View History

2018-08-24 07:20:44 +00:00
" Author: Horacio Sanson <https://github.com/hsanson>
" Description: Support for the Java language server https://github.com/georgewfraser/vscode-javac
call ale#Set('java_javalsp_executable', 'java')
2018-08-24 07:20:44 +00:00
function! ale_linters#java#javalsp#Executable(buffer) abort
return ale#Var(a:buffer, 'java_javalsp_executable')
2018-08-24 07:20:44 +00:00
endfunction
function! ale_linters#java#javalsp#Command(buffer) abort
let l:executable = ale_linters#java#javalsp#Executable(a:buffer)
2019-02-07 09:35:24 +00:00
return ale#Escape(l:executable) . ' -Xverify:none -m javacs/org.javacs.Main'
2018-08-24 07:20:44 +00:00
endfunction
call ale#linter#Define('java', {
\ 'name': 'javalsp',
\ 'lsp': 'stdio',
\ 'executable_callback': 'ale_linters#java#javalsp#Executable',
\ 'command_callback': 'ale_linters#java#javalsp#Command',
\ 'language': 'java',
\ 'project_root_callback': 'ale#java#FindProjectRoot',
\})