<commit_before>#!/bin/bash

if type "pip3" > /dev/null 2>&1; then
  pip3 install neovim
fi

if type "nvim" > /dev/null 2>&1; then
  rm -rf $HOME/.config/nvim $HOME/.vimrc
  mkdir -p $HOME/.config/nvim
  mkdir -p $HOME/.config/coc

  ln -s $HOME/dotfiles/nvim/config.d/vimrc $HOME/.vimrc
  ln -s $HOME/dotfiles/nvim/config.d/init.vim $HOME/.config/nvim/init.vim
  ln -s $HOME/dotfiles/nvim/snippet.d $HOME/.config/coc/ultisnips

  curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

  nvim -u $PWD/nvim/config.d/init.vim +PlugInstall +qall
  nvim -u $PWD/nvim/config.d/init.vim +CocUpdateSync +qall
  echo 'finish creating the neovim environment!'
fi

if type "npm" > /dev/null 2>&1; then
  mkdir -p /tmp/coc-setup
  pushd /tmp/coc-setup
  cp $HOME/dotfiles/nvim/config.d/coc-package.json package.json
  npm install --no-package-lock
  popd
fi<commit_msg>Install plugins if nvim is available<commit_after>#!/bin/bash

if type "pip3" > /dev/null 2>&1; then
  pip3 install neovim
fi

if type "nvim" > /dev/null 2>&1; then
  mkdir -p $HOME/.config/nvim
  mkdir -p $HOME/.config/coc

  ln -s $HOME/dotfiles/nvim/config.d/vimrc $HOME/.vimrc
  ln -s $HOME/dotfiles/nvim/config.d/init.vim $HOME/.config/nvim/init.vim
  ln -s $HOME/dotfiles/nvim/snippet.d $HOME/.config/coc/ultisnips

  curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

  nvim -u $PWD/nvim/config.d/init.vim +PlugInstall +qall
  echo 'Plugin installed'

  if type "npm" > /dev/null 2>&1; then
    mkdir -p /tmp/coc-setup
    pushd /tmp/coc-setup
    cp $HOME/dotfiles/nvim/config.d/coc-package.json package.json
    npm install --no-package-lock
    nvim -u $PWD/nvim/config.d/init.vim +CocUpdateSync +qall
    popd
  fi

  echo 'Finish creating the neovim environment!'
fi
{'fraction_non_alphanumeric': 0.15368531102979613, 'fraction_numerical': 0.00836382645060115, 'mean_word_length': 3.0210084033613445, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '2924038', 'n_tokens_mistral': 840, 'n_tokens_neox': 769, 'n_words': 163}