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/ocaml/merlin.vim

19 lines
433 B
VimL

" Author: Andrey Popp -- @andreypopp
" Description: Report errors in OCaml code with Merlin
if !exists('g:merlin')
finish
endif
function! ale_linters#ocaml#merlin#Handle(buffer, lines) abort
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',
\})