<commit_before>function! JavaScriptFold()
    setl foldmethod=syntax
    setl foldlevelstart=1
    syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend

    function! FoldText()
        return substitute(getline(v:foldstart), '{.*', '{...}', '')
    endfunction
    setl foldtext=FoldText()
endfunction

call JavaScriptFold()
setl fen

" ultisnips
UltiSnipsAddFiletypes javascript-node

" Runners
map <F5> :AsyncRun -raw node %<cr>
map <F6> :AsyncRun node %<cr>

" Autocomplete
let g:ale_fixers.javascript = ['prettier']
let g:ale_fixers["javascript.jsx"] = ['prettier']
<commit_msg>Add flow support for javascript syntax<commit_after>function! JavaScriptFold()
    setl foldmethod=syntax
    setl foldlevelstart=1
    syn region foldBraces start=/{/ end=/}/ transparent fold keepend extend

    function! FoldText()
        return substitute(getline(v:foldstart), '{.*', '{...}', '')
    endfunction
    setl foldtext=FoldText()
endfunction

call JavaScriptFold()
setl fen

" ultisnips
UltiSnipsAddFiletypes javascript-node

" Runners
map <F5> :AsyncRun -raw node %<cr>
map <F6> :AsyncRun node %<cr>

" Autocomplete
let g:ale_fixers.javascript = ['prettier']
let g:ale_fixers["javascript.jsx"] = ['prettier']

" vim-javascript options
let g:javascript_plugin_flow = 1

{'fraction_non_alphanumeric': 0.12888198757763975, 'fraction_numerical': 0.005434782608695652, 'mean_word_length': 4.6784140969163, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '3289366', 'n_tokens_mistral': 448, 'n_tokens_neox': 424, 'n_words': 108}