Changed Pritter to shfmt for bash
This commit is contained in:
parent
9e7961ad7b
commit
20c40577ae
@ -151,6 +151,8 @@ call plug#begin('~/.config/nvim/plugged')
|
|||||||
" Tree
|
" Tree
|
||||||
Plug 'kyazdani42/nvim-web-devicons'
|
Plug 'kyazdani42/nvim-web-devicons'
|
||||||
Plug 'kyazdani42/nvim-tree.lua'
|
Plug 'kyazdani42/nvim-tree.lua'
|
||||||
|
|
||||||
|
Plug 'z0mbix/vim-shfmt', { 'for': 'sh' }
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" LUA
|
" LUA
|
||||||
@ -525,8 +527,12 @@ au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=ya
|
|||||||
autocmd BufWritePre *.yaml,*.yml :Prettier <CR>
|
autocmd BufWritePre *.yaml,*.yml :Prettier <CR>
|
||||||
|
|
||||||
" Bash
|
" Bash
|
||||||
autocmd FileType sh
|
if executable('shfmt')
|
||||||
\ autocmd BufWritePre <buffer> :Prettier <CR>
|
let &l:formatprg='shfmt -i ' . &l:shiftwidth . ' -ln posix -sr -ci -s'
|
||||||
|
endif
|
||||||
|
|
||||||
|
let g:shfmt_extra_args = '-i 4 -ci -sr -s'
|
||||||
|
let g:shfmt_fmt_on_save = 1
|
||||||
|
|
||||||
" Python
|
" Python
|
||||||
autocmd BufRead,BufNewFile *.py set textwidth=0
|
autocmd BufRead,BufNewFile *.py set textwidth=0
|
||||||
|
Loading…
Reference in New Issue
Block a user