jq.vim 544 B

1234567891011121314151617181920212223242526
  1. " Vim compiler file
  2. " Compiler: jq
  3. " Maintainer: Vito <vito.blog@gmail.com>
  4. " Last Change: 2024 Apr 17
  5. " Upstream: https://github.com/vito-c/jq.vim
  6. if exists('b:current_compiler')
  7. finish
  8. endif
  9. let b:current_compiler = 'jq'
  10. let s:save_cpoptions = &cpoptions
  11. set cpoptions&vim
  12. if has('unix')
  13. CompilerSet makeprg=jq\ -f\ %:S\ /dev/null
  14. else
  15. CompilerSet makeprg=jq\ -f\ %:S\ nul
  16. endif
  17. CompilerSet errorformat=%E%m\ at\ \\<%o\\>\\,\ line\ %l:,
  18. \%Z,
  19. \%-G%.%#
  20. let &cpoptions = s:save_cpoptions
  21. unlet s:save_cpoptions