dense-analysis / ale

Check syntax in Vim/Neovim asynchronously and fix files, with Language Server Protocol (LSP) support
BSD 2-Clause "Simplified" License
13.49k stars 1.43k forks source link

Add ale_python_yapf_options variable #1779

Open ghost opened 6 years ago

ghost commented 6 years ago

I use two fixers for python autopep8 and yapf that they overlap some options - able to disable from autopep8's option but re-enabled with yapf. I can't pass its options to ale, I checked document, please add it.

BaksiLi commented 5 years ago

I have the same concern. I like the python fixer 'black' very much, except it enforces you to use double quotes instead of single ones. When using terminal command, one could add the option --skip-string-normalization to skip such fixes. However, it seems that ale doesn't support these features. Sad.

BaksiLi commented 5 years ago

I use two fixers for python autopep8 and yapf that they overlap some options - able to disable from autopep8's option but re-enabled with yapf. I can't pass its options to ale, I checked document, please add it.

Btw, since yapf is configurable, I think you can use yapf solely and get rid of autopep8 now.

This is one example I found on Gist of how to customise yapf:- (Python) yapf configuration file, and also google/yapf. You can do it by creating a new directory at ~/.config/yapf and name it style.

Best Wishes.

ghost commented 5 years ago

Yes, it is, I use yapf only.

w0rp commented 5 years ago

Feel free to create pull request for this.