2016-11-23 10:19:36 -05:00
|
|
|
" Author: Andrey Popp -- @andreypopp
|
|
|
|
" Description: Report errors in OCaml code with Merlin
|
|
|
|
|
|
|
|
if !exists('g:merlin')
|
|
|
|
finish
|
|
|
|
endif
|
|
|
|
|
2017-01-22 09:54:57 -05:00
|
|
|
function! ale_linters#ocaml#merlin#Handle(buffer, lines) abort
|
2016-11-23 10:19:36 -05:00
|
|
|
let l:errors = merlin#ErrorLocList()
|
|
|
|
return l:errors
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
call ale#linter#Define('ocaml', {
|
|
|
|
\ 'name': 'merlin',
|
|
|
|
\ 'executable': 'ocamlmerlin',
|
|
|
|
\ 'command': 'true',
|
|
|
|
\ 'callback': 'ale_linters#ocaml#merlin#Handle',
|
|
|
|
\})
|
|
|
|
|