X-Git-Url: https://git.madduck.net/etc/vim.git/blobdiff_plain/0ee596c5c5e11fc79598407eaf22f83d279f7e9e..5a4872f466ebd76ddd532bdf2798554421c53df4:/.vim/bundle/ale/ale_linters/sml/smlnj_cm.vim diff --git a/.vim/bundle/ale/ale_linters/sml/smlnj_cm.vim b/.vim/bundle/ale/ale_linters/sml/smlnj_cm.vim new file mode 100644 index 00000000..9ad24af4 --- /dev/null +++ b/.vim/bundle/ale/ale_linters/sml/smlnj_cm.vim @@ -0,0 +1,21 @@ +" Author: Jake Zimmerman +" Description: SML checking with SML/NJ Compilation Manager + +function! ale_linters#sml#smlnj_cm#GetCommand(buffer) abort + let l:cmfile = ale#handlers#sml#GetCmFile(a:buffer) + + return 'sml -m ' . l:cmfile . ' < /dev/null' +endfunction + +" Using CM requires that we set "lint_file: 1", since it reads the files +" from the disk itself. +call ale#linter#Define('sml', { +\ 'name': 'smlnj_cm', +\ 'aliases': ['smlnj-cm'], +\ 'executable': function('ale#handlers#sml#GetExecutableSmlnjCm'), +\ 'lint_file': 1, +\ 'command': function('ale_linters#sml#smlnj_cm#GetCommand'), +\ 'callback': 'ale#handlers#sml#Handle', +\}) + +" vim:ts=4:sts=4:sw=4