From 5a572a879e0fd7ace8557e4048ce94186e2933c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Wo=C5=BAniak?= Date: Sat, 24 Sep 2022 15:26:16 +0200 Subject: [PATCH] Changed to force Neoformat use prettier --- .config/nvim/init.vim | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/nvim/init.vim b/.config/nvim/init.vim index b3cb014..f570fde 100644 --- a/.config/nvim/init.vim +++ b/.config/nvim/init.vim @@ -324,7 +324,7 @@ autocmd! CursorHold,CursorHoldI * lua vim.diagnostic.open_float(nil, {focus=fals let g:neoformat_try_formatprg = 1 let g:neoformat_basic_format_trim = 1 let g:neoformat_only_msg_on_error = 1 -autocmd BufWritePre * silent! undojoin | Neoformat +autocmd BufWritePre * silent! undojoin | Neoformat prettier let g:neoformat_python_black = { \ 'exe': 'black', \ 'stdin': 1, @@ -557,9 +557,6 @@ EOF " Files """""""""""""""""""""""""""""""" -" Ansible -au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=yaml.ansible | endif -autocmd BufWritePre *.yaml,*.yml :Prettier " Bash if executable('shfmt') @@ -592,6 +589,7 @@ autocmd BufRead,BufNewFile /tmp/neomutt* map ZQ :Goyo\|q! " Yaml autocmd BufRead,BufNewFile *.yaml let g:indentLine_enabled = 1 autocmd BufRead,BufNewFile *.yaml let g:indentLine_char = '⦙' +au BufRead,BufNewFile *.yaml,*.yml if search('hosts:\|tasks:', 'nw') | set ft=yaml.ansible | endif " Go autocmd BufRead *.go set noexpandtab