zig.vim 617 B

1234567891011121314151617181920212223242526272829
  1. " Vim compiler file
  2. " Compiler: Zig Compiler
  3. " Upstream: https://github.com/ziglang/zig.vim
  4. if exists("current_compiler")
  5. finish
  6. endif
  7. let current_compiler = "zig"
  8. let s:save_cpo = &cpo
  9. set cpo&vim
  10. if exists(":CompilerSet") != 2
  11. command -nargs=* CompilerSet setlocal <args>
  12. endif
  13. " a subcommand must be provided for the this compiler (test, build-exe, etc)
  14. if has('patch-7.4.191')
  15. CompilerSet makeprg=zig\ \$*\ \%:S
  16. else
  17. CompilerSet makeprg=zig\ \$*\ \"%\"
  18. endif
  19. " TODO: improve errorformat as needed.
  20. let &cpo = s:save_cpo
  21. unlet s:save_cpo
  22. " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab