From 8b474fa487f79187b71fd631dd48fa2a1cf9fabd Mon Sep 17 00:00:00 2001 From: tdro Date: Thu, 4 Mar 2021 02:20:01 -0500 Subject: .vimrc: Add brittany --- .vimrc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.vimrc') diff --git a/.vimrc b/.vimrc index c30eab2..21cbf26 100644 --- a/.vimrc +++ b/.vimrc @@ -292,10 +292,10 @@ augroup AutoCommands autocmd BufWritePost *.txt,*.md :only | :term ++rows=10 vale-wrapper % " Linting file type post write commands. - autocmd FileType haskell autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(hlint % 2>&1)"' autocmd FileType css autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(prettier --write --parser css % 2>&1)"' autocmd FileType rust autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(rustfmt % 2>&1 && echo ''rustfmt OK: %'')"' autocmd FileType json autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(jsonlint -i % 2>&1 && echo ''json OK: %'')"' + autocmd FileType haskell autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(hlint % 2>&1 && brittany --write-mode inplace % 2>&1)"' autocmd FileType c autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(clang-format -i % 2>&1 && echo ''clang-format OK: %'')"' autocmd FileType go autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(gofmt -w -s -e % 2>&1 && go vet % 2>&1 && echo ''gofmt OK: %'')"' autocmd FileType awk autocmd! BufWritePost silent exe '!' . expand(g:notify) . ' ' . '"$(awk -g -f % 2>&1 && awk -o- -f % | sponge % && echo ''awk OK: %'')"' -- cgit v1.2.3