nvim: init.vim: Enable clang format

Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
Sanchayan Maity 2019-10-25 10:48:49 +05:30
parent d92b5c7041
commit dffa59022c

View file

@ -75,6 +75,7 @@ Plug 'jeetsukumaran/vim-buffergator'
Plug 'vim-utils/vim-man'
Plug 'unblevable/quick-scope'
Plug 'igankevich/mesonic'
Plug 'rhysd/vim-clang-format', { 'for': [ 'c', 'cpp'] }
" Initialize plugin system
call plug#end()
@ -319,6 +320,9 @@ let g:gutentags_ctags_extra_args = [
\ '--fields=+ailmnS',
\ ]
" Automatically detect style file and apply style to formatting
let g:clang_format#detect_style_file = 1
" Default indentations
autocmd BufRead,BufNewFile */gst-*/*.[ch] set et sw=2
autocmd BufRead,BufNewFile */gstreamer-*/*.[ch] set et sw=2