lint on Fucus gained
Is there an easy way to make ALE run the linter when the buffer regains focus? I've been trying to do this with auto commands with little success.
It's not so easy. I used to do this, but you run into problems like checking a buffer for problems after focusing a window after having left a quickfix window you just closed, when in turn opens the quickfix window again. You shouldn't have to check a buffer for problems after you bring it into focus. Checking when a buffer is created, read, saved, or edited should be enough.
That makes allot of sense. I was looking for this because if I fix something in another split view buffer (example a bug in a C/C++ header file) and a source file found the bug it would detect the fix in the source file until I wrote to it or edited it. That being said it sounds like manually triggering the lint is better.
It might be possible to support this by using the FileChangedShellPost command to detect if a buffer is changed, and then check a buffer on BufEnter based on a flag being set.
Now files will be checked on enter if they have been changed outside of Vim. (Or straight away if that's the file you have open.)