File: other_source.vim

package info (click to toggle)
vim-ale 4.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 8,764 kB
  • sloc: sh: 499; python: 311; perl: 31; makefile: 4; xml: 4; javascript: 1
file content (21 lines) | stat: -rw-r--r-- 857 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
" Tell ALE that another source has started checking a buffer.
function! ale#other_source#StartChecking(buffer, linter_name) abort
    call ale#engine#InitBufferInfo(a:buffer)
    let l:list = g:ale_buffer_info[a:buffer].active_other_sources_list

    call add(l:list, a:linter_name)
    call uniq(sort(l:list))
endfunction

" Show some results, and stop checking a buffer.
" To clear results or cancel checking a buffer, an empty List can be given.
function! ale#other_source#ShowResults(buffer, linter_name, loclist) abort
    call ale#engine#InitBufferInfo(a:buffer)
    let l:info = g:ale_buffer_info[a:buffer]

    " Remove this linter name from the active list.
    let l:list = l:info.active_other_sources_list
    call filter(l:list, 'v:val isnot# a:linter_name')

    call ale#engine#HandleLoclist(a:linter_name, a:buffer, a:loclist, 1)
endfunction