zig_build.vim 675 B

123456789101112131415161718192021222324252627282930
  1. " Vim compiler file
  2. " Compiler: Zig Compiler (zig build)
  3. " Upstream: https://github.com/ziglang/zig.vim
  4. if exists('current_compiler')
  5. finish
  6. endif
  7. runtime compiler/zig.vim
  8. let current_compiler = 'zig_build'
  9. let s:save_cpo = &cpo
  10. set cpo&vim
  11. if exists(':CompilerSet') != 2
  12. command -nargs=* CompilerSet setlocal <args>
  13. endif
  14. if exists('g:zig_build_makeprg_params')
  15. execute 'CompilerSet makeprg=zig\ build\ '.escape(g:zig_build_makeprg_params, ' \|"').'\ $*'
  16. else
  17. CompilerSet makeprg=zig\ build\ $*
  18. endif
  19. " TODO: anything to add to errorformat for zig build specifically?
  20. let &cpo = s:save_cpo
  21. unlet s:save_cpo
  22. " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab