I am using the https://github.com/Chiel92/vim-autoformat plugin with scalafmt, and have the following in my .vimrc:
" scalafmt settings
let g:formatdef_scalafmt = "'scalafmt --stdin'"
let g:formatters_scala = ['scalafmt']
noremap <localleader>f :Autoformat<CR>
let g:autoformat_autoindent = 0
let g:autoformat_retab = 0
let g:autoformat_remove_trailing_spaces = 0
I have verified that scalafmt is working when I call it from outside vim. There are no error messages displayed, but the buffer does not get updated.
Running :CurrentFormatter
results in: Selected formatter: scalafmt
Is there something missing from my configuration?
just to make the answer complete,
as suggested in Issues using vim-autoformat with scalafmt