dotfiles/nvim/.config/nvim/after/ftplugin/c.vim
2021-10-01 10:00:13 +05:30

13 lines
537 B
VimL

setlocal makeprg=ninja\ -C\ build
nmap <buffer> <silent> gh :ClangdSwitchSourceHeader<CR>
" If we are working with any of the gstreamer projects in C, run gst-ident
" before saving. Assume gst-ident from gstreamer/tools/gst-indent has been
" made available in path.
"
" The '!' after autocmd is required without which, the command gets triggered
" multiple times. Basically, we clear the autocmd.
autocmd! BufWritePost */gst-*/*.c call c#format_with_gst_indent()
autocmd! BufWritePost */gstreamer-*/*.c call c#format_with_gst_indent()