pug_lint_vue.vim 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. "============================================================================
  2. "File: pug_lint_vue.vim
  3. "Description: Syntax checking plugin for syntastic using pug-lint-vue
  4. " (https://github.com/sourceboat/pug-lint-vue)
  5. "Maintainer: Tim Carry <tim at pixelastic dot com>
  6. "License: This program is free software. It comes without any warranty,
  7. " to the extent permitted by applicable law. You can redistribute
  8. " it and/or modify it under the terms of the Do What The Fuck You
  9. " Want To Public License, Version 2, as published by Sam Hocevar.
  10. " See http://sam.zoy.org/wtfpl/COPYING for more details.
  11. "
  12. "============================================================================
  13. if exists('g:loaded_syntastic_vue_pug_lint_vue_checker')
  14. finish
  15. endif
  16. let g:loaded_syntastic_vue_pug_lint_vue_checker = 1
  17. let s:save_cpo = &cpo
  18. set cpo&vim
  19. function! SyntaxCheckers_vue_pug_lint_vue_GetLocList() dict
  20. let buf = bufnr('')
  21. let makeprg = self.makeprgBuild({ 'fname': syntastic#util#shescape(fnamemodify(bufname(buf), ':p')) })
  22. let errorformat = '%\s%#%l:%c %m'
  23. return SyntasticMake({
  24. \ 'makeprg': makeprg,
  25. \ 'errorformat': errorformat,
  26. \ 'defaults': { 'bufnr': buf, 'type': 'E' } })
  27. endfunction
  28. call g:SyntasticRegistry.CreateAndRegisterChecker({
  29. \ 'filetype': 'vue',
  30. \ 'name': 'pug_lint_vue',
  31. \ 'exec': 'pug-lint-vue' })
  32. let &cpo = s:save_cpo
  33. unlet s:save_cpo
  34. " vim: set sw=4 sts=4 et fdm=marker: