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