Add :BuildDir to select YouCompleteMe build directory

This commit is contained in:
2020-10-06 17:12:06 +01:00
parent b148f9fb68
commit d960053dfc
2 changed files with 9 additions and 0 deletions

6
autoload/build.vim Normal file
View File

@@ -0,0 +1,6 @@
function! build#dir(dir) abort
let l:cwd = getcwd()
let $BUILD_DIR = l:cwd.'/'.a:dir
let g:ycm_clangd_args = ['--compile-commands-dir='.$BUILD_DIR]
YcmRestartServer
endfunction