diff --git a/vimrc b/vimrc index 183fb5f..2cb78ac 100644 --- a/vimrc +++ b/vimrc @@ -180,6 +180,9 @@ let g:campo_custom_ctags_args = "" " searching the modules and how_to directories with CtrlP let g:campo_jai_path = '' +" Args to include when compiling a Jai file. +let g:campo_jai_build_args = '' + "################################################################ "################################################################ "################################################################ @@ -1315,9 +1318,11 @@ function! Build(optimized=0, silent=0) if a:silent let l:async_cmd .= "-post=call\\ HideAsyncResults() " endif + let l:is_jai = 0 let l:cmd = "" if filereadable(l:parent_dir . "/build.jai") " Jai build file + let l:is_jai = 1 let l:cmd = "jai " . l:parent_dir . "/build.jai " if a:optimized == 1 echo "Compiling release build.jai" @@ -1326,6 +1331,7 @@ function! Build(optimized=0, silent=0) echo "Compiling debug build.jai" endif elseif l:ext == "jai" + let l:is_jai = 1 let l:cmd = "jai % " if a:optimized == 1 echo "Compiling release " . expand('%:t') @@ -1343,6 +1349,9 @@ function! Build(optimized=0, silent=0) let l:cmd .= '-o ' endif endif + if l:is_jai + let l:cmd .= ' '.g:campo_jai_build_args + endif exec l:async_cmd . l:cmd endfunction