<commit_before>" indentation for cabal
"
" author: raichoo (<EMAIL>)
"
if exists('b:did_indent')
  finish
endif

let b:did_indent = 1

if !exists('g:cabal_indent_section')
  "executable name
  ">>main-is:           Main.hs
  ">>hs-source-dirs:    src
  let g:cabal_indent_section = 2
elseif exists('g:cabal_indent_section') && g:cabal_indent_section > 4
  let g:cabal_indent_section = 4
endif

setlocal indentexpr=GetCabalIndent()
setlocal indentkeys=!^F,o,O,<CR>

function! GetCabalIndent()
  let l:prevline = getline(v:lnum - 1)

  if l:prevline =~ '^\([eE]xecutable\|[lL]ibrary\|[fF]lag\|[sS]ource-repository\|[tT]est-suite\)'
    return g:cabal_indent_section
  else
    return match(l:prevline, '\S')
  endif
endfunction<commit_msg>indent benchmark blocks<commit_after>" indentation for cabal
"
" author: raichoo (<EMAIL>)
"
if exists('b:did_indent')
  finish
endif

let b:did_indent = 1

if !exists('g:cabal_indent_section')
  "executable name
  ">>main-is:           Main.hs
  ">>hs-source-dirs:    src
  let g:cabal_indent_section = 2
elseif exists('g:cabal_indent_section') && g:cabal_indent_section > 4
  let g:cabal_indent_section = 4
endif

setlocal indentexpr=GetCabalIndent()
setlocal indentkeys=!^F,o,O,<CR>

function! GetCabalIndent()
  let l:prevline = getline(v:lnum - 1)

  if l:prevline =~ '\C^\(executable\|library\|flag\|source-repository\|test-suite\|benchmark\)'
    return g:cabal_indent_section
  else
    return match(l:prevline, '\S')
  endif
endfunction
{'fraction_non_alphanumeric': 0.14237516869095818, 'fraction_numerical': 0.006747638326585695, 'mean_word_length': 4.861660079051384, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 17, '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': '60624', 'n_tokens_mistral': 600, 'n_tokens_neox': 584, 'n_words': 109}