<commit_before>let s:plugins={}

function! plugin#lazy(config) abort
  let l:id=a:config.pack . '::' . a:config.plugin
  let s:plugins[l:id]=a:config
  let l:load='call <SID>load("' . l:id . '")'
  if has_key(a:config, 'commands')
    for l:command in items(a:config.commands)
      let l:deletions=map(keys(a:config.commands), '"delcommand " . v:val')
      execute 'command! ' .
            \ l:command[1] . ' ' .
            \ l:command[0] . ' ' .
            \ ':' . join(l:deletions, ' <bar> ') . ' <bar> ' .
            \ l:load . ' <bar> ' .
            \ l:command[0] .
            \ ' <args>'
    endfor
  endif
  if has_key(a:config, 'nnoremap')
    for l:mapping in items(a:config.nnoremap)
      execute 'nnoremap ' .
        \ l:mapping[0] .
        \ ' :' . l:load . '<CR>' .
        \ l:mapping[1]
    endfor
  endif
endfunction

function! s:load(id) abort
  let l:config=s:plugins[a:id]
  let l:split=split(a:id, '::')
  let l:pack=l:split[0]
  let l:plugin=l:split[1]
  if has_key(l:config, 'beforeload')
    for l:item in l:config.beforeload
      execute l:item
    endfor
  endif<commit_msg>vim: apply a minor readability tweak<commit_after>let s:plugins={}

function! plugin#lazy(config) abort
  let l:id=a:config.pack . '::' . a:config.plugin
  let s:plugins[l:id]=a:config
  let l:load='call <SID>load("' . l:id . '")'
  if has_key(a:config, 'commands')
    for l:command in items(a:config.commands)
      let l:deletions=map(keys(a:config.commands), '"delcommand " . v:val')
      execute 'command! ' .
            \ l:command[1] . ' ' .
            \ l:command[0] . ' ' .
            \ ':' . join(l:deletions, ' <bar> ') . ' <bar> ' .
            \ l:load . ' <bar> ' .
            \ l:command[0] .
            \ ' <args>'
    endfor
  endif
  if has_key(a:config, 'nnoremap')
    for l:mapping in items(a:config.nnoremap)
      execute 'nnoremap ' .
        \ l:mapping[0] . ' ' .
        \ ':' . l:load . '<CR>' .
        \ l:mapping[1]
    endfor
  endif
endfunction

function! s:load(id) abort
  let l:config=s:plugins[a:id]
  let l:split=split(a:id, '::')
  let l:pack=l:split[0]
  let l:plugin=l:split[1]
  if has_key(l:config, 'beforeload')
    for l:item in l:config.beforeload
      execute l:item
    endfor
  endif
{'fraction_non_alphanumeric': 0.18133333333333335, 'fraction_numerical': 0.006222222222222222, 'mean_word_length': 2.334814814814815, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, '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': '4814565', 'n_tokens_mistral': 886, 'n_tokens_neox': 875, 'n_words': 156}