diff options
author | Pau Ruiz Safont <unduthegun@gmail.com> | 2021-05-27 08:33:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-27 16:33:43 +0900 |
commit | a02a4f2811f810877f3c3859cca963f9578ff94a (patch) | |
tree | 2cf796d557bb86fdaa9bb0a01ee8e897ffed9516 /ale_linters/ocamlinterface/merlin.vim | |
parent | f53431331e2e2030a84de081baec93aad1e62363 (diff) | |
download | ale-a02a4f2811f810877f3c3859cca963f9578ff94a.zip |
ocaml: prepare for filetype separation (#3732)
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.
Diffstat (limited to 'ale_linters/ocamlinterface/merlin.vim')
-rw-r--r-- | ale_linters/ocamlinterface/merlin.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/ale_linters/ocamlinterface/merlin.vim b/ale_linters/ocamlinterface/merlin.vim new file mode 100644 index 00000000..799490f7 --- /dev/null +++ b/ale_linters/ocamlinterface/merlin.vim @@ -0,0 +1,17 @@ +" 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', +\}) |