dotfiles/nvim/.config/nvim/after/ftplugin/c.vim

14 lines
581 B
VimL
Raw Normal View History

" Scanning included files when ^n is troublesome
setlocal complete-=i
setlocal path+=/usr/include/**
setlocal makeprg=ninja\ -C\ build
" 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()