diff options
author | David Briscoe <idbrii@gmail.com> | 2022-02-04 09:42:26 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-04 17:42:26 +0000 |
commit | 5856c067755d5ff9e14c306d93d1a3605ee966fc (patch) | |
tree | 271ec74708e0729fb3b78501e43d0bb75211d00c /autoload | |
parent | 6d20b6c1628bff0a0eeacd0bf02c0dd1463c3acb (diff) | |
download | ale-5856c067755d5ff9e14c306d93d1a3605ee966fc.zip |
Add ALEPopulateQuickfix and ALEPopulateLocList (#3761)
Closes #1810
Add ALEPopulateQuickfix and ALEPopulateLocList. They're not very useful
with ale's default auto-populate behaviour, so their useful configuration
is described in help.
Diffstat (limited to 'autoload')
-rw-r--r-- | autoload/ale/list.vim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/autoload/ale/list.vim b/autoload/ale/list.vim index 089aa2c0..7865cf70 100644 --- a/autoload/ale/list.vim +++ b/autoload/ale/list.vim @@ -212,6 +212,23 @@ function! ale#list#SetLists(buffer, loclist) abort endif endfunction +function! ale#list#ForcePopulateErrorList(populate_quickfix) abort + let l:quickfix_bak = g:ale_set_quickfix + let g:ale_set_quickfix = a:populate_quickfix + let l:loclist_bak = g:ale_set_loclist + let g:ale_set_loclist = !a:populate_quickfix + let l:open_list_bak = g:ale_open_list + let g:ale_open_list = 1 + + let l:buffer = bufnr('') + let l:loclist = get(g:ale_buffer_info, l:buffer, {'loclist': []}).loclist + call s:SetListsImpl(-1, l:buffer, l:loclist) + + let g:ale_open_list = l:open_list_bak + let g:ale_set_loclist = l:loclist_bak + let g:ale_set_quickfix = l:quickfix_bak +endfunction + function! s:CloseWindowIfNeeded(buffer) abort if ale#Var(a:buffer, 'keep_list_window_open') || !s:ShouldOpen(a:buffer) return |