vim: fix build_cmd default params

This commit is contained in:
Mathieu Maret 2023-07-18 12:18:13 +02:00
parent e633dc11b2
commit 6083380b89
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ endif
" --extra=+q : Adds context to the tag name. Note: Without this
" option, the script cannot get class members.
if !exists("g:build_cmd")
let g:build_cmd="make"
let g:build_cmd="make --dry-run --always-make"
endif
" More tools can be found here: https://github.com/Sarcasm/notes/blob/master/dev/compilation-database.rst
@ -122,7 +122,7 @@ func! MenuCB(id, result)
elseif a:result == 4
call AutotagsAdd()
elseif a:result == 5
execute "!" . g:build_cmd . " --dry-run --always-make | grep -wE 'gcc|g++|cc|clang|clang++' | grep -w '\\-c' | jq -nR '[inputs|{directory:\".\", command:., file: match(\" [^ ]+$\").string[1:]}]' > compile_commands.json"
execute "!" . g:build_cmd . " | grep -wE 'gcc|g++|cc|clang|clang++' | grep -w '\\-c' | jq -nR '[inputs|{directory:\".\", command:., file: match(\" [^ ]+$\").string[1:]}]' > compile_commands.json"
elseif a:result == 6 "https://github.com/rizsotto/Bear
execute "!bear --" g:build_cmd "--always-make"
elseif a:result == 7 "https://github.com/nickdiego/compiledb