diff --git a/.vim/plugin/cscope_plus.vim b/.vim/plugin/cscope_plus.vim index d06af90..4db6f97 100644 --- a/.vim/plugin/cscope_plus.vim +++ b/.vim/plugin/cscope_plus.vim @@ -72,6 +72,15 @@ if has("cscope") call GetCscopeDb(path) endfunction command! GenerateCscopeDb :call GenerateCscopeDb() + " Open out/verbose.log.gz then run this cmd. It should produce a compile_commands.json. This is for case when SOONG variable + " Does not work (see + " https://android.googlesource.com/platform/build/soong/+/HEAD/docs/compdb.md) + function! GenerateCompileDbFromAOSP() + let @a="" + %s/\[\d*\/\d*\] \/bin\/bash -c "\(.*\)"/\=setreg('A', submatch(1), 'V')/gn + call system("compiledb ", @a) + endfunction + command! GenerateCompileDbFromAOSP :call GenerateCompileDbFromAOSP() endif " Let autotags find all cscodepeDb " LoadLocalCscopeDb