1
0
Fork 0
mirror of synced 2024-11-04 16:38:59 -05:00
ultimate-vim/sources_non_forked/syntastic/syntax_checkers/sml/smlnj.vim

48 lines
1.5 KiB
VimL
Raw Normal View History

2015-02-04 05:43:54 -05:00
"============================================================================
2015-02-24 05:45:22 -05:00
"File: smlnj.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: LCD 47 <lcd047 at gmail dot com>
2015-02-04 05:43:54 -05:00
"License: This program is free software. It comes without any warranty,
" to the extent permitted by applicable law. You can redistribute
" it and/or modify it under the terms of the Do What The Fuck You
" Want To Public License, Version 2, as published by Sam Hocevar.
" See http://sam.zoy.org/wtfpl/COPYING for more details.
2015-02-24 05:45:22 -05:00
"
2015-02-04 05:43:54 -05:00
"============================================================================
2015-07-13 06:22:46 -04:00
if exists('g:loaded_syntastic_sml_smlnj_checker')
2015-02-04 05:43:54 -05:00
finish
endif
2015-02-24 05:45:22 -05:00
let g:loaded_syntastic_sml_smlnj_checker = 1
2015-02-04 05:43:54 -05:00
let s:save_cpo = &cpo
set cpo&vim
2015-02-24 05:45:22 -05:00
function! SyntaxCheckers_sml_smlnj_GetLocList() dict
let makeprg = self.makeprgBuild({})
2015-02-04 05:43:54 -05:00
2015-02-24 05:45:22 -05:00
let errorformat =
\ '%E%f:%l%\%.%c %trror: %m,' .
\ '%E%f:%l%\%.%c-%\d%\+%\%.%\d%\+ %trror: %m,' .
\ '%W%f:%l%\%.%c %tarning: %m,' .
\ '%W%f:%l%\%.%c-%\d%\+%\%.%\d%\+ %tarning: %m,' .
\ '%C%\s%\+%m,' .
2015-02-04 05:43:54 -05:00
\ '%-G%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,
2015-02-24 05:45:22 -05:00
\ 'errorformat': errorformat,
\ 'postprocess': ['compressWhitespace'],
\ 'returns': [0, 1] })
2015-02-04 05:43:54 -05:00
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
2015-02-24 05:45:22 -05:00
\ 'filetype': 'sml',
\ 'name': 'smlnj',
\ 'exec': 'sml'})
2015-02-04 05:43:54 -05:00
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: