Note: this is a neovim question, not stock vim
I have both rbprettier
and prettier
with the ruby plugin installed on my system. If I pipe a Ruby file into rbprettier
, or if I pipe it into prettier --parser ruby
, I get back a properly formatted version of the file.
I have ALE configured to format on save, and when ALE pipes the file into prettier
, it always does so with --parser babel
, which triggers fatal errors.
This is my ALE fixer configuration:
let g:ale_fixers = {
\ '*': ['remove_trailing_lines', 'trim_whitespace'],
\ 'javascript': ['prettier', 'eslint'],
\ 'typescript': ['prettier', 'eslint'],
\ 'ruby': ['prettier'],
\ 'rust': ['rustfmt'],
\}
let g:ale_fix_on_save = 1
How can I reconfigure ALE to either call rbprettier
directly for Ruby files, or to add the --parser ruby
option instead of --parser javascript
when I'm working in a Ruby file?