<commit_before>" Add twig pattern files to path to be able to configure below. Enables `gf`
" on include to jump to that file. MSK specific.
setlocal path+=/Users/delucac/Sites/mskcc_build/web/themes/mskcc/patternlab/source/_patterns/,/Users/delucac/Sites/msk-design-system/src/patterns/,/Users/delucac/Sites/mskcc_amp/web/themes/mskcc/patternlab/source/_patterns/

" Set pattern for vim to recognize twig includes.
setlocal include="^\s*\{\%\s*include\|^\s*\{\%\s*embed\|^\s*\{\%\s*extends"

" Remove `@` in include for file path. MSK specific.
setlocal includeexpr=substitute(v:fname,'\@mskds','','g')

" Use twig commenting instead of HTML.
setlocal commentstring={#\ %s\ #}

" Use twiglint linter.
execute('compiler twiglint')

" vim:fdm=marker ft=vim et sts=2 sw=2
<commit_msg>Always highlight html in twig files<commit_after>" Add twig pattern files to path to be able to configure below. Enables `gf`
" on include to jump to that file. MSK specific.
setlocal path+=/Users/delucac/Sites/mskcc_build/web/themes/mskcc/patternlab/source/_patterns/,/Users/delucac/Sites/msk-design-system/src/patterns/,/Users/delucac/Sites/mskcc_amp/web/themes/mskcc/patternlab/source/_patterns/

" Always add html highlighting as well.
setlocal filetype=html.twig

" Set pattern for vim to recognize twig includes.
setlocal include="^\s*\{\%\s*include\|^\s*\{\%\s*embed\|^\s*\{\%\s*extends"

" Remove `@` in include for file path. MSK specific.
setlocal includeexpr=substitute(v:fname,'\@mskds','','g')

" Use twig commenting instead of HTML.
setlocal commentstring={#\ %s\ #}

" Use twiglint linter.
execute('compiler twiglint')

" vim:fdm=marker ft=vim et sts=2 sw=2

{'fraction_non_alphanumeric': 0.15226586102719034, 'fraction_numerical': 0.002416918429003021, 'mean_word_length': 4.79020979020979, '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': '1542975', 'n_tokens_mistral': 613, 'n_tokens_neox': 590, 'n_words': 143}