Commit Graph

8 Commits

Author SHA1 Message Date
w0rp
08cfd5f90c
Close #1379 - Increment b:ale_linted when a buffer is checked 2018-03-03 16:22:56 +00:00
Martin Tournoij
4825cce1cc
Run before lint cycle, rename autocmds 2017-12-10 13:10:52 +00:00
Martin Tournoij
d6bf13502a
Add ALEStartLint autocmd
This grew out of my work in #1193; to ensure the statusline was being
updated I had to add:

    fun! s:redraw(timer)
        redrawstatus
    endfun

    augroup ALEProgress
        autocmd!
        autocmd BufWritePost * call timer_start(100, function('s:redraw'))
        autocmd User ALELint redrawstatus
    augroup end

Which kind of works, but is ugly. With this, I can replace the
`BufWritePost` with:

    autocmd User ALEStartLint redrawstatus

Which is much better, IMHO.

Actually, this patch actually replaces adding a function, since you can
do:

    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint hi Statusline ctermfg=darkgrey
        autocmd User ALELint      hi Statusline ctermfg=NONE
    augroup end

or:

    let s:ale_running = 0
    let l:stl .= '%{s:ale_running ? "[linting]" : ""}'
    augroup ALEProgress
        autocmd!
        autocmd User ALEStartLint let s:ale_running = 1 | redrawstatus
        autocmd User ALELint      let s:ale_running = 0 | redrawstatus
    augroup end

Both seem to work very well in my testing.

No need to `ale#Statusline#IsRunning()` anymore, I think?
2017-12-07 16:14:20 +00:00
w0rp
5afbc9b701 Simplify the tests for the ALELint autocmd command 2017-07-14 00:33:12 +01:00
w0rp
fcc17dffbe Fix a test 2017-06-06 09:54:17 +01:00
w0rp
c546f47cc0 Merge everything into the one global map. 2016-10-24 20:21:42 +01:00
Bjorn Neergaard
dc99282f79
Clean up some test filenames and extraneous code 2016-10-22 08:53:28 -05:00
Bjorn Neergaard
0e6f406fe0
Add autocommand test 2016-10-17 20:14:21 -05:00