dotfiles/nvim/.config/nvim/after/ftplugin/c.vim
Sanchayan Maity 4b8caad3b6 nvim: plugins: Drop cscope
Now that we have migrated to clang LSP for C, the only reason for
keeping it around was using it to find files in gst-build repository
which was structured in such a way that fzf and rg could not be used.
Now that GStreamer has moved to monorepo setup, we can use fzf and
rg just like in any project. No need for cscope anymore.
2021-09-30 14:20:42 +05:30

14 lines
581 B
VimL

" 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()