vimrc: added a json autoformat

This commit is contained in:
Marcin Woźniak 2025-03-05 10:44:17 +01:00
parent 5dd29e237e
commit 095b489048
Signed by: y0rune
GPG Key ID: F204C385F57EB348

View File

@ -642,6 +642,9 @@ autocmd BufRead,BufNewFile *.yaml,*.yml let g:indentLine_char = '⦙'
au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=yaml.ansible | endif au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=yaml.ansible | endif
autocmd BufWritePre *.yaml,*.yml silent! undojoin | Neoformat prettier autocmd BufWritePre *.yaml,*.yml silent! undojoin | Neoformat prettier
" JSON
autocmd BufWritePre *.json silent! undojoin | Neoformat prettier
" GoLang " GoLang
autocmd BufRead *.go set noexpandtab autocmd BufRead *.go set noexpandtab
autocmd BufWritePre *.go lua go_org_imports() autocmd BufWritePre *.go lua go_org_imports()