summaryrefslogtreecommitdiff
path: root/ale_linters/ocaml/merlin.vim
blob: cfec99669dbfef1323b491f56adf4b75ef056361 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
" 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
    return merlin#ErrorLocList()
endfunction

call ale#linter#Define('ocaml', {
\   'name': 'merlin',
\   'executable': 'ocamlmerlin',
\   'command': 'true',
\   'callback': 'ale_linters#ocaml#merlin#Handle',
\})