<commit_before>" vim: ts=4 sw=4 et

let s:highlights = {'file': {}, 'project': {}}
let s:highlight_types = {
    \ 'E': 'NeomakeError',
    \ 'W': 'NeomakeWarning',
    \ 'I': 'NeomakeInformational',
    \ 'M': 'NeomakeMessage'
    \ }

function! s:InitBufHighlights(type, buf) abort
    let s:highlights[a:type][a:buf] = {
        \ 'NeomakeError': [],
        \ 'NeomakeWarning': [],
        \ 'NeomakeInformational': [],
        \ 'NeomakeMessage': []
        \ }
endfunction

function! neomake#highlights#ResetFile(buf) abort
    call s:InitBufHighlights('file', a:buf)
    call neomake#highlights#ShowHighlights()
endfunction

function! neomake#highlights#ResetProject(buf) abort
    call s:InitBufHighlights('project', a:buf)
    call neomake#highlights#ShowHighlights()
endfunction

function! neomake#highlights#AddHighlight(entry, type) abort
    if !has_key(s:highlights[a:type], a:entry.bufnr)
        call s:InitBufHighlights(a:type, a:entry.bufnr)
    endif
    if a:entry.col
        let l:hi = get(s:highlight_types, toupper(a:entry.type), 'NeomakeError')
        let l:length = 1
        if has_key(a:entry, 'length')
            let l:length = a:entry.length
        endif
        call add(s:highlights[a:type][a:entry.bufnr][l:hi], [a:entry.lnum, a:entry.col, l:length])
    endif
endfunction

function! neomake#highlights#ShowHighlights() abort
    call s:ResetHighlights()
    let l:buf = bufnr('%')
    for l:type in ['file', 'project']
        for l:hi in keys(get(s:highlights[l:type], l:buf, {}))
            call add(w:current_highlights, matchaddpos(l:hi, s:highlights[l:type][l:buf][l:hi]))
        endfor
    endfor
endfunction

let s:highlights_defined = 0<commit_msg>Add option to highlight complete line<commit_after>" vim: ts=4 sw=4 et

let s:highlights = {'file': {}, 'project': {}}
let s:highlight_types = {
    \ 'E': 'NeomakeError',
    \ 'W': 'NeomakeWarning',
    \ 'I': 'NeomakeInformational',
    \ 'M': 'NeomakeMessage'
    \ }

function! s:InitBufHighlights(type, buf) abort
    let s:highlights[a:type][a:buf] = {
        \ 'NeomakeError': [],
        \ 'NeomakeWarning': [],
        \ 'NeomakeInformational': [],
        \ 'NeomakeMessage': []
        \ }
endfunction

function! neomake#highlights#ResetFile(buf) abort
    call s:InitBufHighlights('file', a:buf)
    call neomake#highlights#ShowHighlights()
endfunction

function! neomake#highlights#ResetProject(buf) abort
    call s:InitBufHighlights('project', a:buf)
    call neomake#highlights#ShowHighlights()
endfunction

function! neomake#highlights#AddHighlight(entry, type) abort
    if !has_key(s:highlights[a:type], a:entry.bufnr)
        call s:InitBufHighlights(a:type, a:entry.bufnr)
    endif
    if a:entry.col
        let l:hi = get(s:highlight_types, toupper(a:entry.type), 'NeomakeError')
        if get(g:, 'neomake_highlight_line', 0)
            let l:loc = a:entry.lnum
        else
            let l:loc = [a:entry.lnum, a:entry.col, get(a:entry, 'length', 1)]
        endif
        call add(s:highlights[a:type][a:entry.bufnr][l:hi], l:loc)
    endif
endfunction

function! neomake#highlights#ShowHighlights() abort
    call s:ResetHighlights()
    let l:buf = bufnr('%')
    for l:type in ['file', 'project']
        for l:hi in keys(get(s:highlights[l:type], l:buf, {}))
            call add(w:current_highlights, matchaddpos(l:hi, s:highlights[l:type][l:buf][l:hi]))
        endfor
    endfor
endfunction

let s:highlights_defined = 0
{'fraction_non_alphanumeric': 0.15219907407407407, 'fraction_numerical': 0.0026041666666666665, 'mean_word_length': 3.6093333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4016497', 'n_tokens_mistral': 1261, 'n_tokens_neox': 1240, 'n_words': 230}