mirror of
https://github.com/dense-analysis/ale
synced 2024-12-17 20:05:31 +00:00
a02a4f2811
The ocaml filetype is currently used for several, different file formats. This causes problems as not all tools support all formats. New filetypes are introduced to support this separation, this needs some changes in ale that are fortunately backwards-compatible. These change add ocamlinterface file support for ocp-indent, merlin, ocamlformat and ocaml-lsp. For ocaml-lsp I took the liberty to add all recognised language ids, even if they are not supported. ols has not been changed as the project has been abandoned since 2019.
18 lines
437 B
VimL
18 lines
437 B
VimL
" Author: Andrey Popp -- @andreypopp
|
|
" Description: Report errors in OCaml code with Merlin
|
|
|
|
if !exists('g:merlin')
|
|
finish
|
|
endif
|
|
|
|
function! ale_linters#ocamlinterface#merlin#Handle(buffer, lines) abort
|
|
return merlin#ErrorLocList()
|
|
endfunction
|
|
|
|
call ale#linter#Define('ocamlinterface', {
|
|
\ 'name': 'merlin',
|
|
\ 'executable': 'ocamlmerlin',
|
|
\ 'command': 'true',
|
|
\ 'callback': 'ale_linters#ocamlinterface#merlin#Handle',
|
|
\})
|