summaryrefslogtreecommitdiff
path: root/ale_linters/reason/merlin.vim
diff options
context:
space:
mode:
Diffstat (limited to 'ale_linters/reason/merlin.vim')
-rw-r--r--ale_linters/reason/merlin.vim17
1 files changed, 17 insertions, 0 deletions
diff --git a/ale_linters/reason/merlin.vim b/ale_linters/reason/merlin.vim
new file mode 100644
index 00000000..7bef7df8
--- /dev/null
+++ b/ale_linters/reason/merlin.vim
@@ -0,0 +1,17 @@
+" Author: Andrey Popp -- @andreypopp
+" Description: Report errors in ReasonML code with Merlin
+
+if !exists('g:merlin')
+ finish
+endif
+
+function! ale_linters#reason#merlin#Handle(buffer, lines) abort
+ return merlin#ErrorLocList()
+endfunction
+
+call ale#linter#Define('reason', {
+\ 'name': 'merlin',
+\ 'executable': 'ocamlmerlin',
+\ 'command': 'true',
+\ 'callback': 'ale_linters#reason#merlin#Handle',
+\})