-1

My vimrc: https://paste.fedoraproject.org/paste/Wl5jvebADSDoAI4HbIX-hA and my corresponding python file is: https://paste.fedoraproject.org/paste/g60mU7xBqGaEuKKWkZ6Rnw

The problem is, with ALE, as activated in my vimrc's line 168, should be able to fix problems like "no space around operator" etc. But It is not. On the other hand it seems, no fixers is actually loaded.

My ALEInfo is: https://paste.fedoraproject.org/paste/-H6bujuam3WMuLt1gxer3Q

Can someone kindly show me where my vimrc went wrong?

BaRud
  • 481
  • 2
  • 10

1 Answers1

2

In your ALEInfo output, it shows that ALE is using the variables from your latex autogroup. (Line 38: let b:ale_fixers = ['latexindent', 'remove_trailing_lines', 'trim_whitespace'])

Each of your autogroups are being loaded and b:ale_fixers is being overridden each time. You could add something like the following to each of your augroups:

au FileType *.py let b:ale_fixers = ['remove_trailing_lines', 'trim_whitespace', 'isort', 'yapf']

However I think it would be a better solution would be to use a dictionary for ALE fixers instead of setting them in each augroup:

let g:ale_fixers = {
\   'fortran': ['remove_trailing_lines', 'trim_whitespace'],
\   'latex': ['latexindent', 'remove_trailing_lines', 'trim_whitespace'],
\   'python': ['remove_trailing_lines', 'trim_whitespace', 'isort', 'yapf']
\}
Jack Higgins
  • 108
  • 6