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