-
Notifications
You must be signed in to change notification settings - Fork 131
/
.lvimrc
30 lines (24 loc) · 927 Bytes
/
.lvimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
" Local vim rc
if exists('g:build_dir')
finish
endif
let g:build_type = get(g:, 'build_type', 'Debug')
let g:build_tests = get(g:, 'build_tests', 'ON')
let g:cc = get(g:, 'cc', 'clang')
let g:cxx = get(g:, 'cxx', 'clang++')
let g:root_dir = g:localvimrc_script_dir_unresolved
let $ROOT_DIR = g:root_dir
let $UNCRUSTIFY_CONFIG = g:root_dir.'/uncrustify.cfg'
let g:build_dir = g:root_dir.'/build'
let &g:makeprg = 'cd '.g:build_dir.' && make -j1'
packadd termdebug
let g:termdebug_wide=1
nnoremap <leader>c :call asyncrun#run('',
\ {'mode':'terminal','save':2},
\ 'cmake -B '.g:build_dir.' -DCMAKE_BUILD_TYPE='.g:build_type.' -DBUILD_TESTS='.g:build_tests
\ .' -DCMAKE_CXX_COMPILER='.g:cxx.' -DCMAKE_C_COMPILER='.g:cc
\ .' -DCMAKE_EXPORT_COMPILE_COMMANDS=ON'
\ .' -DBUILD_JNI_BINDING=ON'
\ .' -DBUILD_NODEJS_BINDING=ON'
\ .' -DBUILD_DART_BINDING=OFF')
\<CR>