Add :BuildDir to select YouCompleteMe build directory
This commit is contained in:
parent
b148f9fb68
commit
d960053dfc
6
autoload/build.vim
Normal file
6
autoload/build.vim
Normal 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
|
@ -29,3 +29,6 @@ command! -nargs=+ -complete=file Debug call do#debug(<f-args>)
|
||||
|
||||
" Find all TODO items in the current file and populate the location list
|
||||
command! TodoFile lvimgrep /todo/ %
|
||||
|
||||
" Change build directory
|
||||
command! -nargs=1 -complete=dir BuildDir call build#dir(<f-args>)
|
||||
|
Loading…
x
Reference in New Issue
Block a user