X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/haskell/hdevtools.vim?ds=sidebyside diff --git a/.vim/bundle/ale/ale_linters/haskell/hdevtools.vim b/.vim/bundle/ale/ale_linters/haskell/hdevtools.vim new file mode 100644 index 00000000..3e55e4f0 --- /dev/null +++ b/.vim/bundle/ale/ale_linters/haskell/hdevtools.vim @@ -0,0 +1,20 @@ +" Author: rob-b, Takano Akio +" Description: hdevtools for Haskell files + +call ale#Set('haskell_hdevtools_executable', 'hdevtools') +call ale#Set('haskell_hdevtools_options', get(g:, 'hdevtools_options', '-g -Wall')) + +function! ale_linters#haskell#hdevtools#GetCommand(buffer) abort + let l:executable = ale#Var(a:buffer, 'haskell_hdevtools_executable') + + return ale#handlers#haskell_stack#EscapeExecutable(l:executable, 'hdevtools') + \ . ' check' . ale#Pad(ale#Var(a:buffer, 'haskell_hdevtools_options')) + \ . ' -p %s %t' +endfunction + +call ale#linter#Define('haskell', { +\ 'name': 'hdevtools', +\ 'executable': {b -> ale#Var(b, 'haskell_hdevtools_executable')}, +\ 'command': function('ale_linters#haskell#hdevtools#GetCommand'), +\ 'callback': 'ale#handlers#haskell#HandleGHCFormat', +\})