-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?

  • 3
    I think you didn't paste your vimrc correctly. That definitely doesn't have 168 lines. Also: How do I debug my vimrc file? – muru Jun 4 at 7:46
  • oh...sorry! correct vimrc updated. – BaRud Jun 4 at 7:51
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']
\}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.