<commit_before>" Neovim config file

" Redefine the user's vimrc' file to mean this file (~/.config/nvim/init.vim).
let $MYVIMRC = stdpath('config') . '/init.vim'

" Directory containing extra configuration files for plugins installed with
" vim-plug. We decide when and how to load these files. Neovim does not load
" them automatically.
let g:plugin_config_dir = stdpath('config') . '/plug-config'

" Directory containing '.vim' and '.lua' files that should override default
" config in the 'plugin/' and 'plug-config/' directories.
" This directory is not tracked by Git, and may or may not exist.
let g:override_config_dir = stdpath('config') . '/override-config'

" Directory containing all installed plugins
let g:plugin_install_dir = stdpath('data') . '/site/pack/packer/start'

" The file specifying all third-party plugins to use.
let g:packer_plugins_file = stdpath('config') . '/lua/plugins.lua'

" Load plugins defined in ./lua/plugins.lua:
lua require('plugins')

" Private functions {{{

" Source a file in the plugin-config dir.
function! s:SourcePluginConfigFile(filename)
  let l:filepath = g:plugin_config_dir . '/' . a:filename

  if l:filepath =~ '\.vim$'
    silent execute 'source ' . l:filepath
  elseif l:filepath =~ '\.lua$'
    silent execute 'luafile ' . l:filepath
  endif
endfunction

" Source all files in the 'override-config/' directory. The 'override-config/'
" directory does not have to be present for this function to work properly, and
" is only intended to allow for machine-local overrides of our baseline
" configuration.
function! s:SourceOverrideConfigFiles()
  for lf in split(glob(g:override_config_dir . '/*.lua'), '\n')
    silent execute 'luafile ' . lf
  endfor
  for vf in split(glob(g:override_config_dir . '/*.vim'), '\n')
    silent execute 'source ' . vf<commit_msg>Simplify Neovim config override function<commit_after>" Neovim config file

" Redefine the user's vimrc' file to mean this file (~/.config/nvim/init.vim).
let $MYVIMRC = stdpath('config') . '/init.vim'

" Directory containing extra configuration files for plugins installed with
" vim-plug. We decide when and how to load these files. Neovim does not load
" them automatically.
let g:plugin_config_dir = stdpath('config') . '/plug-config'

" Directory containing '.vim' and '.lua' files that should override default
" config in the 'plugin/' and 'plug-config/' directories.
" This directory is not tracked by Git, and may or may not exist.
let g:override_config_dir = stdpath('config') . '/override-config'

" Directory containing all installed plugins
let g:plugin_install_dir = stdpath('data') . '/site/pack/packer/start'

" The file specifying all third-party plugins to use.
let g:packer_plugins_file = stdpath('config') . '/lua/plugins.lua'

" Load plugins defined in ./lua/plugins.lua:
lua require('plugins')

" Private functions {{{

" Source a file in the plugin-config dir.
function! s:SourcePluginConfigFile(filename)
  let l:filepath = g:plugin_config_dir . '/' . a:filename

  if l:filepath =~ '\.vim$'
    silent execute 'source ' . l:filepath
  elseif l:filepath =~ '\.lua$'
    silent execute 'luafile ' . l:filepath
  endif
endfunction

" Source all files in the 'override-config/' directory. The 'override-config/'
" directory does not have to be present for this function to work properly, and
" is only intended to allow for machine-local overrides of our baseline
" configuration.
function! s:SourceOverrideConfigFiles()
  for f in split(glob(g:override_config_dir . '/*'), '\n')
    if f =~ '\.vim$'
      silent execute 'source ' . f
    elseif f =~ '\.lua$'
      silent execute 'luafile ' . f
    endif
{'fraction_non_alphanumeric': 0.1168724279835391, 'fraction_numerical': 0.0, 'mean_word_length': 4.0993006993006995, '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': '2455435', 'n_tokens_mistral': 1116, 'n_tokens_neox': 1099, 'n_words': 398}