-
Notifications
You must be signed in to change notification settings - Fork 4
/
.lvimrc
32 lines (25 loc) · 887 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
31
32
" 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 -j4'
packadd termdebug
let g:termdebug_wide = 1
nnoremap <leader>cc :call asyncrun#run('',
\ {'mode':'bang','save':2},
\ 'cmake -B '.g:build_dir.' -DCMAKE_BUILD_TYPE='.g:build_type
\.' -DBUILD_TESTS='.g:build_tests
\.' -DBUILD_EXAMPLES=ON'
\.' -DCMAKE_CXX_COMPILER='.g:cxx
\.' -DCMAKE_C_COMPILER='.g:cc
\.' -DCMAKE_EXPORT_COMPILE_COMMANDS=ON')
\<CR>
call LocalVimRCFinish()