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