jsl.vim 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. "============================================================================
  2. "File: jsl.vim
  3. "Description: Javascript syntax checker - using jsl
  4. "Maintainer: Martin Grenfell <martin.grenfell at gmail dot com>
  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. if exists('g:loaded_syntastic_javascript_jsl_checker')
  12. finish
  13. endif
  14. let g:loaded_syntastic_javascript_jsl_checker = 1
  15. let s:save_cpo = &cpo
  16. set cpo&vim
  17. function! SyntaxCheckers_javascript_jsl_GetLocList() dict
  18. call syntastic#log#deprecationWarn('javascript_jsl_conf', 'javascript_jsl_args',
  19. \ "'-conf ' . syntastic#util#shexpand(OLD_VAR)")
  20. let makeprg = self.makeprgBuild({
  21. \ 'args_after': '-nologo -nofilelisting -nosummary -nocontext -process' })
  22. let errorformat =
  23. \ '%W%f(%l): lint warning: %m,'.
  24. \ '%-Z%p^,'.
  25. \ '%W%f(%l): warning: %m,'.
  26. \ '%-Z%p^,'.
  27. \ '%E%f(%l): SyntaxError: %m,'.
  28. \ '%-Z%p^,'.
  29. \ '%-G'
  30. return SyntasticMake({
  31. \ 'makeprg': makeprg,
  32. \ 'errorformat': errorformat })
  33. endfunction
  34. call g:SyntasticRegistry.CreateAndRegisterChecker({
  35. \ 'filetype': 'javascript',
  36. \ 'name': 'jsl'})
  37. let &cpo = s:save_cpo
  38. unlet s:save_cpo
  39. " vim: set sw=4 sts=4 et fdm=marker: