Compare commits
2 Commits
4aceb7aca9
...
61b877286b
Author | SHA1 | Date | |
---|---|---|---|
61b877286b | |||
ff20ba6bd2 |
@ -37,8 +37,11 @@ function! build#dir(...) abort
|
|||||||
if exists('l:dir')
|
if exists('l:dir')
|
||||||
" Set build directory and restart YouCompleteMe.
|
" Set build directory and restart YouCompleteMe.
|
||||||
let $BUILD_DIR = getcwd().'/'.substitute(l:dir, '\/$', '', '')
|
let $BUILD_DIR = getcwd().'/'.substitute(l:dir, '\/$', '', '')
|
||||||
let g:ycm_clangd_args = ['--compile-commands-dir='.$BUILD_DIR]
|
" TODO: Check .vim/coc-settings.json exists, create it if not
|
||||||
YcmRestartServer
|
let l:coc_settings = json_decode(join(readfile('.vim/coc-settings.json'), ''))
|
||||||
|
let l:coc_settings['clangd.compilationDatabasePath'] = $BUILD_DIR
|
||||||
|
call writefile([json_encode(l:coc_settings)], '.vim/coc-settings.json')
|
||||||
|
CocRestart
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
" coc.nvim
|
" coc.nvim
|
||||||
nnoremap <leader>fi :CocFix<CR>
|
nnoremap <leader>fi <Plug>(coc-fix-current)
|
||||||
nnoremap <leader>gd :YcmCompleter GoTo<CR>
|
nnoremap <leader>gd <Plug>(coc-definition)
|
||||||
nnoremap <leader>gt :YcmCompleter GetType<CR>
|
nnoremap <leader>gt <Plug>(coc-type-definition)
|
||||||
nnoremap <leader>sd :YcmShowDetailedDiagnostic<CR>
|
nnoremap <leader>sd <Plug>(coc-diagnostic-info)
|
||||||
nnoremap <leader>D <plug>(YCMHover)
|
|
||||||
|
|
||||||
" termdebug
|
" termdebug
|
||||||
" TODO: Detecet if termdebug is loaded, if not do the default action.
|
" TODO: Detecet if termdebug is loaded, if not do the default action.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user