Bram Moolenaar | 86b4816 | 2022-12-06 18:20:10 +0000 | [diff] [blame] | 1 | " Vim compiler file |
| 2 | " Compiler: Zig Compiler |
| 3 | " Upstream: https://github.com/ziglang/zig.vim |
| 4 | |
| 5 | if exists("current_compiler") |
| 6 | finish |
| 7 | endif |
| 8 | let current_compiler = "zig" |
| 9 | |
| 10 | let s:save_cpo = &cpo |
| 11 | set cpo&vim |
| 12 | |
Bram Moolenaar | 86b4816 | 2022-12-06 18:20:10 +0000 | [diff] [blame] | 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 | |
| 20 | " TODO: improve errorformat as needed. |
| 21 | |
| 22 | let &cpo = s:save_cpo |
| 23 | unlet s:save_cpo |
| 24 | " vim: tabstop=8 shiftwidth=4 softtabstop=4 expandtab |