Name: yaml
URL: https://pypi.org/project/pyaml/
Neoformat can format YAML/YML files using pyaml. I would much rather use ALE for all my linter/fixer needs. ALE has support for yaml linters via swaglint or yamllint, but no yaml fixers (a much needed functionality when writing lots of yaml files by hand).
FYI there is now prettier support for yaml.
Thank you @tomsvogel .
I was not aware of that one.
Since I am already using prettier for JS, I can also use prettier for yaml. Therefore, I have no need for pyaml at this time.
I am not 100% shure but i think to use prettier as yaml fixer ALE hast to be extended.
Here is what I did and it seems to work for me:
let g:ale_fixers = {
\ "*": ['trim_whitespace', 'remove_trailing_lines'],
\ 'javascript': ['prettier', 'eslint'],
\ 'sh': ['shfmt'],
\ 'yaml': ['prettier'],
\}
As long as you have prettier installed (e.g. npm i -g prettier), that should work.
Most helpful comment
Here is what I did and it seems to work for me:
As long as you have
prettierinstalled (e.g.npm i -g prettier), that should work.