clisp.vim 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. "============================================================================
  2. "File: lisp.vim
  3. "Description: Syntax checking plugin for syntastic.vim
  4. "Maintainer: Karl Yngve Lervåg <karl.yngve@lervag.net>
  5. "License: This program is free software. It comes without any warranty,
  6. " to the extent permitted by applicable law. You can redistribute
  7. " it and/or modify it under the terms of the Do What The Fuck You
  8. " Want To Public License, Version 2, as published by Sam Hocevar.
  9. " See http://sam.zoy.org/wtfpl/COPYING for more details.
  10. "
  11. "============================================================================
  12. if exists('g:loaded_syntastic_lisp_clisp_checker')
  13. finish
  14. endif
  15. let g:loaded_syntastic_lisp_clisp_checker = 1
  16. let s:save_cpo = &cpo
  17. set cpo&vim
  18. function! SyntaxCheckers_lisp_clisp_GetLocList() dict
  19. let tmpdir = syntastic#util#tmpdir()
  20. let out = tmpdir !=# '.' ? ('-o ' . syntastic#util#shescape(tmpdir . syntastic#util#Slash() . 'syntastic_' . getpid())) : ''
  21. let makeprg = self.makeprgBuild({
  22. \ 'args_after': '-q',
  23. \ 'fname_before': '-c',
  24. \ 'post_args_after': out })
  25. let errorformat =
  26. \ '%-G;%.%#,' .
  27. \ '%W%>WARNING:%.%# line %l : %m,' .
  28. \ '%Z %#%m,' .
  29. \ '%W%>WARNING:%.%# lines %l%\%.%\%.%\d%\+ : %m,' .
  30. \ '%Z %#%m,' .
  31. \ '%E%>The following functions were %m,' .
  32. \ '%Z %m,' .
  33. \ '%-G%.%#'
  34. let loclist = SyntasticMake({
  35. \ 'makeprg': makeprg,
  36. \ 'errorformat': errorformat,
  37. \ 'defaults': {'bufnr': bufnr('')} })
  38. call syntastic#util#rmrf(tmpdir)
  39. return loclist
  40. endfunction
  41. call g:SyntasticRegistry.CreateAndRegisterChecker({
  42. \ 'filetype': 'lisp',
  43. \ 'name': 'clisp'})
  44. let &cpo = s:save_cpo
  45. unlet s:save_cpo
  46. " vim: set sw=4 sts=4 et fdm=marker: