New checker for SML: smlnj.

This commit is contained in:
LCD 47 2015-02-23 15:31:09 +02:00
parent c452935384
commit 2a07c4acd9
4 changed files with 51 additions and 3 deletions

View File

@ -59,8 +59,8 @@ Elixir, Erlang, eRuby, Fortran, Gentoo metadata, GLSL, Go, Haml, Haskell,
Haxe, Handlebars, HSS, HTML, Java, JavaScript, JSON, JSX, LESS, Lex, Limbo,
LISP, LLVM intermediate language, Lua, Markdown, MATLAB, NASM, Objective-C,
Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable Object, OS X and
iOS property lists, Puppet, Python, R, Racket, Relax NG, reStructuredText,
RPM spec, Ruby, SASS/SCSS, Scala, Slim, Tcl, TeX, Texinfo, Twig, TypeScript,
iOS property lists, Puppet, Python, R, Racket, Relax NG, reStructuredText, RPM
spec, Ruby, SASS/SCSS, Scala, Slim, SML, Tcl, TeX, Texinfo, Twig, TypeScript,
Vala, Verilog, VHDL, VimL, xHtml, XML, XSLT, YACC, YAML, z80, Zope page
templates, and zsh. See the [wiki][3] for details about the corresponding
supported checkers. A number of third party Vim plugins also provide checking

View File

@ -19,7 +19,7 @@ if has('reltime')
lockvar! g:_SYNTASTIC_START
endif
let g:_SYNTASTIC_VERSION = '3.6.0-38'
let g:_SYNTASTIC_VERSION = '3.6.0-40'
lockvar g:_SYNTASTIC_VERSION
" Sanity checks {{{1

View File

@ -73,6 +73,7 @@ let s:_DEFAULT_CHECKERS = {
\ 'scss': ['sass', 'scss_lint'],
\ 'sh': ['sh', 'shellcheck'],
\ 'slim': ['slimrb'],
\ 'sml': ['smlnj'],
\ 'spec': ['rpmlint'],
\ 'tcl': ['nagelfar'],
\ 'tex': ['lacheck', 'chktex'],

View File

@ -0,0 +1,47 @@
"============================================================================
"File: smlnj.vim
"Description: Syntax checking plugin for syntastic.vim
"Maintainer: LCD 47 <lcd047 at gmail dot com>
"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.
"
"============================================================================
if exists("g:loaded_syntastic_sml_smlnj_checker")
finish
endif
let g:loaded_syntastic_sml_smlnj_checker = 1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_sml_smlnj_GetLocList() dict
let makeprg = self.makeprgBuild({})
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,' .
\ '%-G%.%#'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat,
\ 'postprocess': ['compressWhitespace'],
\ 'returns': [0, 1] })
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'sml',
\ 'name': 'smlnj',
\ 'exec': 'sml'})
let &cpo = s:save_cpo
unlet s:save_cpo
" vim: set sw=4 sts=4 et fdm=marker: