From 5bed58e55cd9d5b1198853d2c418ccb3da370229 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sat, 6 May 2023 22:07:05 -0400 Subject: [PATCH] Split jai compiler and metaprogram args in vimrc --- vimrc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/vimrc b/vimrc index f62d469..c397aab 100644 --- a/vimrc +++ b/vimrc @@ -183,7 +183,8 @@ let g:campo_custom_ctags_args = "" let g:campo_jai_path = '' " Args to include when compiling a Jai file. -let g:campo_jai_build_args = '' +let g:campo_jai_compiler_args = '' +let g:campo_jai_metaprogram_args = '' "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| @@ -1197,7 +1198,8 @@ function! Build(optimized=0, silent=0) endif if l:is_jai - let l:cmd .= ' '.g:campo_jai_build_args + let l:cmd .= ' '.g:campo_jai_compiler_args + let l:set_metaprogram_args = 0 if l:has_jai_build_file if a:optimized == 1 @@ -1209,6 +1211,7 @@ function! Build(optimized=0, silent=0) " for local modules because the build file should manage that " sort of thing for us. let l:cmd .= " - release" + let l:set_metaprogram_args = 1 else echo "Compiling debug build.jai" endif @@ -1225,6 +1228,14 @@ function! Build(optimized=0, silent=0) let l:cmd .= " -import_dir modules" endif endif + + if g:campo_jai_compiler_args != "" + if l:set_metaprogram_args == 1 + let l:cmd .= ' '.g:campo_jai_metaprogram_args + else + let l:cmd .= ' - '.g:campo_jai_metaprogram_args + endif + endif endif " I was originally passing -save=2 to AsyncRun! in order to save all