Install nvim with coc.nvim and NERDTree
Add this to your .vimrc:
""" NERDTree
" Show NERDTree file manager
autocmd VimEnter * NERDTree | wincmd p
" Exit vim if NERDTree is last window
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') &&b:NERDTree.isTabTree() | quit | endif
let g:NERDTreeWinSize=20
""" COC
so ~/.vim/coc.vim " (download from example on https://github.com/neoclide/coc.nvim/blob/release/Readme.md)
Install coc-clangd:
:CocInstall coc-clangd
Install scan-build
# pip install scan-build
Initialise, clone etc your project as usual. Then run (or whatever build system you are using):
$ intercept-build make all
You may wish to add this as a task in your Makefile:
intercept:
intercept-build make all
Add the resulting compile_commands.json to your .gitignore:
$ echo compile_commands.json > .gitignore
Edit code in nvim and build as normal
Run make intercept
after adding any new files or includes.