diff options
Diffstat (limited to 'ale_linters/ocaml')
-rw-r--r-- | ale_linters/ocaml/merlin.vim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ale_linters/ocaml/merlin.vim b/ale_linters/ocaml/merlin.vim new file mode 100644 index 00000000..f8e0329e --- /dev/null +++ b/ale_linters/ocaml/merlin.vim @@ -0,0 +1,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', +\}) + |