{"action":"created","issue":{"url":"https://api.github.com/repos/w0rp/ale/issues/1203","repository_url":"https://api.github.com/repos/w0rp/ale","labels_url":"https://api.github.com/repos/w0rp/ale/issues/1203/labels{/name}","comments_url":"https://api.github.com/repos/w0rp/ale/issues/1203/comments","events_url":"https://api.github.com/repos/w0rp/ale/issues/1203/events","html_url":"https://github.com/w0rp/ale/pull/1203","id":280188580,"number":1203,"title":"Add ALEStartLint autocmd","user":{"login":"Carpetsmoker","id":1032692,"avatar_url":"https://avatars1.githubusercontent.com/u/1032692?v=4","gravatar_id":"","url":"https://api.github.com/users/Carpetsmoker","html_url":"https://github.com/Carpetsmoker","followers_url":"https://api.github.com/users/Carpetsmoker/followers","following_url":"https://api.github.com/users/Carpetsmoker/following{/other_user}","gists_url":"https://api.github.com/users/Carpetsmoker/gists{/gist_id}","starred_url":"https://api.github.com/users/Carpetsmoker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Carpetsmoker/subscriptions","organizations_url":"https://api.github.com/users/Carpetsmoker/orgs","repos_url":"https://api.github.com/users/Carpetsmoker/repos","events_url":"https://api.github.com/users/Carpetsmoker/events{/privacy}","received_events_url":"https://api.github.com/users/Carpetsmoker/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2017-12-07T16:15:12Z","updated_at":"2018-03-07T12:19:22Z","closed_at":"2017-12-17T12:06:58Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/w0rp/ale/pulls/1203","html_url":"https://github.com/w0rp/ale/pull/1203","diff_url":"https://github.com/w0rp/ale/pull/1203.diff","patch_url":"https://github.com/w0rp/ale/pull/1203.patch"},"body":"This grew out of my work in #1193; to ensure the statusline was being\r\nupdated I had to add:\r\n\r\n    fun! s:redraw(timer)\r\n        redrawstatus\r\n    endfun\r\n\r\n    augroup ALEProgress\r\n        autocmd!\r\n        autocmd BufWritePost * call timer_start(100, function('s:redraw'))\r\n        autocmd User ALELint redrawstatus\r\n    augroup end\r\n\r\nWhich kind of works, but is ugly. With this, I can replace the\r\n`BufWritePost` with:\r\n\r\n    autocmd User ALEStartLint redrawstatus\r\n\r\nWhich is much better, IMHO.\r\n\r\nActually, this patch actually replaces adding a function, since you can\r\ndo:\r\n\r\n    augroup ALEProgress\r\n        autocmd!\r\n        autocmd User ALEStartLint hi Statusline ctermfg=darkgrey\r\n        autocmd User ALELint      hi Statusline ctermfg=NONE\r\n    augroup end\r\n\r\nor:\r\n\r\n    let s:ale_running = 0\r\n    let l:stl .= '%{s:ale_running ? \"[linting]\" : \"\"}'\r\n    augroup ALEProgress\r\n        autocmd!\r\n        autocmd User ALEStartLint let s:ale_running = 1 | redrawstatus\r\n        autocmd User ALELint      let s:ale_running = 0 | redrawstatus\r\n    augroup end\r\n\r\nBoth seem to work very well in my testing.\r\n\r\nNo need to `ale#Statusline#IsRunning()` anymore, I think?\r\n\r\n<!--\r\nREAD THIS: Before creating a pull request, please consider the following first.\r\n\r\n* The most important thing you can do is write tests. Code without tests\r\n  probably doesn't work, and will almost certainly stop working later on. Pull\r\n  requests without tests probably won't be accepted, although there are some\r\n  exceptions.\r\n* Read the Contributing guide linked above first.\r\n* If you are adding a new linter, remember to update the README.md file and\r\n  doc/ale.txt first.\r\n* If you add or modify a function for converting error lines into loclist items\r\n  that ALE can work with, please add Vader tests for them. Look at existing\r\n  tests in the test/handler directory, etc.\r\n* If you add or modify a function for computing a command line string for\r\n  running a command, please add Vader tests for that.\r\n* Generally try and cover anything with Vader tests, although some things just\r\n  can't be tested with Vader, or at least they can be hard to test. Consider\r\n  breaking up your code so that some parts can be tested, and generally open up\r\n  a discussion about it.\r\n* Have fun!\r\n-->\r\n"},"comment":{"url":"https://api.github.com/repos/w0rp/ale/issues/comments/371121181","html_url":"https://github.com/w0rp/ale/pull/1203#issuecomment-371121181","issue_url":"https://api.github.com/repos/w0rp/ale/issues/1203","id":371121181,"user":{"login":"w0rp","id":3518142,"avatar_url":"https://avatars2.githubusercontent.com/u/3518142?v=4","gravatar_id":"","url":"https://api.github.com/users/w0rp","html_url":"https://github.com/w0rp","followers_url":"https://api.github.com/users/w0rp/followers","following_url":"https://api.github.com/users/w0rp/following{/other_user}","gists_url":"https://api.github.com/users/w0rp/gists{/gist_id}","starred_url":"https://api.github.com/users/w0rp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/w0rp/subscriptions","organizations_url":"https://api.github.com/users/w0rp/orgs","repos_url":"https://api.github.com/users/w0rp/repos","events_url":"https://api.github.com/users/w0rp/events{/privacy}","received_events_url":"https://api.github.com/users/w0rp/received_events","type":"User","site_admin":false},"created_at":"2018-03-07T12:19:22Z","updated_at":"2018-03-07T12:19:22Z","author_association":"OWNER","body":"Open an issue for `vim-airline`, or create a plugin for it. That kind of stuff isn't handled by this codebase, just the support for writing that kind of stuff."}}
{"actor":{"display_login":"w0rp"}}