summaryrefslogtreecommitdiff
path: root/ale_linters/ocaml/merlin.vim
blob: f8e0329e3d8d16ede899069b243af5070e919c99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
" 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)
  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',
\})