Cleanup fo the racket checker.

This commit is contained in:
LCD 47 2013-12-01 19:05:07 +02:00
parent 5b4dc6734a
commit aa63e1d79e
3 changed files with 19 additions and 15 deletions

View File

@ -31,9 +31,9 @@ Coq, CSS, Cucumber, CUDA, D, Dart, DocBook, Dust, Elixir, Erlang, eRuby,
Fortran, Gentoo metadata, Go, Haml, Haskell, Haxe, Handlebars, HSS, HTML, Java,
JavaScript, JSON, LESS, Limbo, LISP, LLVM intermediate language, Lua, MATLAB,
NASM, Objective-C, Objective-C++, OCaml, Perl, Perl POD, PHP, gettext Portable
Object, Puppet, Python, reStructuredText, Ruby, Rust, SASS/SCSS, Scala, Slim,
Tcl, TeX, Twig, TypeScript, Vala, Verilog, VHDL, xHtml, XML, XSLT, YAML, z80,
Zope page templates, zsh.
Object, Puppet, Python, Racket, reStructuredText, Ruby, Rust, SASS/SCSS, Scala,
Slim, Tcl, TeX, Twig, TypeScript, Vala, Verilog, VHDL, xHtml, XML, XSLT, YAML,
z80, Zope page templates, zsh.
## Screenshot

View File

@ -53,6 +53,7 @@ let s:defaultCheckers = {
\ 'pod': ['podchecker'],
\ 'puppet': ['puppet', 'puppetlint'],
\ 'python': ['python', 'flake8', 'pylint'],
\ 'racket': ['racket'],
\ 'rst': ['rst2pseudoxml'],
\ 'ruby': ['mri'],
\ 'rust': ['rustc'],

View File

@ -19,29 +19,32 @@ let g:loaded_syntastic_racket_racket_checker=1
let s:save_cpo = &cpo
set cpo&vim
function! SyntaxCheckers_racket_racket_IsAvailable() dict
return executable(self.getExec())
endfunction
" at some point put in the GetHightlightRegex(item) callback
function! SyntaxCheckers_racket_racket_GetLocList() dict
let makeprg = self.makeprgBuild({'args': ''})
let makeprg = self.makeprgBuild({})
" example of error message
"eval-apply.rkt:460:30: the-empty-environment: unbound identifier in module
" in: the-empty-environment
let errorformat = '%f:%l:%c: %m'
let errorformat = '%f:%l:%v: %m'
return SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
let loclist = SyntasticMake({
\ 'makeprg': makeprg,
\ 'errorformat': errorformat })
for e in loclist
if has_key(e, 'col')
let e['col'] += 1
endif
endfor
return loclist
endfunction
call g:SyntasticRegistry.CreateAndRegisterChecker({
\ 'filetype': 'racket',
\ 'exec': 'racket',
\ 'name': 'racket'})
\ 'filetype': 'racket',
\ 'name': 'racket'})
let &cpo = s:save_cpo
unlet s:save_cpo