<commit_before>" Functions that have to load first
"
" vim-markdown-composer
function! BuildComposer(info)
  if a:info.status != 'unchanged' || a:info.force
    if has('nvim')
      !cargo build --release --locked
    else
      !cargo build --release --locked --no-default-features --features json-rpc
    endif
  endif
endfunction

" Python
" Follow python virtualenvs provider instructions to setup:
" https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
" https://neovim.io/doc/user/provider.html
let g:python_host_prog = expand('~/.pyenv/versions/py2nvim/bin/python')
let g:python3_host_prog = expand('~/.pyenv/versions/py3nvim/bin/python')


call plug#begin('~/.local/share/nvim/plugged')

" Themes
Plug 'altercation/vim-colors-solarized'
Plug 'lifepillar/vim-solarized8'
Plug 'lifepillar/vim-colortemplate'
Plug 'Rigellute/rigel'
Plug 'nanotech/jellybeans.vim'
Plug 'joshdick/onedark.vim'
Plug 'challenger-deep-theme/vim', { 'as': 'challenger-deep' }

" Plug 'file://'.expand('~/dev/twodark.vim'), { 'branch': 'dev' }
" Plug 'file://'.expand('~/dev/rigel'), { 'branch': 'dev' }

" Misc
Plug 'itchyny/lightline.vim'
Plug 'maximbaz/lightline-ale'
Plug 'tribou/vim-buftabline'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/vim-peekaboo'
Plug 'preservim/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
"Plug 'tpope/vim-sensible'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-ragtag'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-dispatch'
Plug 'radenling/vim-dispatch-neovim'
Plug 't9md/vim-surround_custom_mapping'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-dotenv'
Plug 'mileszs/ack.vim'
Plug 'justinmk/vim-sneak'
" Plug 'junegunn/rainbow_parentheses.vim'
Plug 'mbbill/undotree'
Plug 'janko/vim-test'
Plug 'benmills/vimux'
Plug 'sk1418/HowMuch'

" Debugging
Plug 'vim-vdebug/vdebug', { 'on': 'VdebugStart' }

" Auto-formatting
Plug 'editorconfig/editorconfig-vim', { 'commit': '68f8136d2b018bfa9b23403e87d3d65bc942cbc3' }
" Using this only for the manual :Prettier command
Plug 'prettier/vim-prettier', {
  \ 'do': 'yarn install',
  \ 'for': ['javascript', 'javascript.jsx', 'typescript', 'typescriptreact', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }

" Auto-complete
Plug 'dense-analysis/ale', { 'tag': 'v3.*' }
" coc.nvim and vscode-compatible extensions
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-tslint-plugin', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-highlight', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-git', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-snippets', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-eslint', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-sources', {'rtp': 'packages/emoji', 'do': 'yarn install --frozen-lockfile'}
" Plug 'neoclide/coc-emmet', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-solargraph', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-lists', {'do': 'yarn install --frozen-lockfile'}
Plug 'iamcco/coc-svg', {'do': 'yarn install --frozen-lockfile'}
Plug 'amiralies/coc-elixir', {'do': 'yarn install --frozen-lockfile'}
Plug 'andys8/vscode-jest-snippets', {'do': 'npm ci'}
" Plug 'flowtype/flow-for-vscode', {'do': 'yarn install --frozen-lockfile'}
Plug 'github/copilot.vim', {'branch': 'release'}

" TODO: test ncm2 for autocompletion
" Plug 'ncm2/ncm2'
" ncm2: you need to install completion sources to get completions. Check
" our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki
" Plug 'ncm2/ncm2-bufword'
" Plug 'ncm2/ncm2-tmux'
" Plug 'ncm2/ncm2-path'

" Misc syntax
" TODO: test vim-polyglot and remove most other syntax plugins
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-liquid'
Plug 'neoclide/jsonc.vim'

" Other JS/CSS/HTML
" Plug 'mattn/emmet-vim', { 'for': ['css', 'html'] }
Plug 'JulesWang/css.vim'
" Plug 'cakebaker/scss-syntax.vim' - vim-polyglot
" Plug 'wavded/vim-stylus' - vim-polyglot
Plug 'mustache/vim-mustache-handlebars'

" Markdown
Plug 'euclio/vim-markdown-composer', {
  \ 'do': function('BuildComposer'),
  \ 'for': ['markdown'],
  \ }

"" Golang
Plug 'fatih/vim-go', {
  \ 'tag': '*', 'do': ':GoInstallBinaries',
  \ 'for': ['go'],
  \ }

"" HashiCorp
"Plug 'hashivim/vim-consul'
"Plug 'hashivim/vim-nomadproject'
"Plug 'hashivim/vim-ottoproject'
"Plug 'hashivim/vim-packer'
"Plug 'hashivim/vim-terraform'
"Plug 'hashivim/vim-vagrant'
"Plug 'hashivim/vim-vaultproject'

"" Other Languages
"Plug 'docker/docker', { 'branch': '1.12.x', 'rtp': 'contrib/syntax/vim' }
" Plug 'elixir-lang/vim-elixir' - vim-polyglot
" Plug 'vim-scripts/nginx.vim' - vim-polyglot
"Plug 'apple/swift', { 'branch': 'swift-2.3-branch', 'rtp': 'utils/vim' }
" Plug 'cespare/vim-toml' - vim-polyglot
"Plug 'chrisbra/unicode.vim'

" JavaScript
"Plug 'jelera/vim-javascript-syntax', { 'tag': '*' }
"Plug 'bigfish/vim-js-context-coloring'
" Plug 'kchmck/vim-coffee-script' - vim-polyglot
Plug 'heavenshell/vim-jsdoc'
"Plug 'aaronj1335/underscore-templates.vim'
" Plug '~/dev/vim-syntax-js'
" Plug 'pangloss/vim-javascript', { 'tag': '1.2.*' } - vim-polyglot
" Plug 'mxw/vim-jsx' - using vim-polyglot
" Plug 'jparise/vim-graphql', { 'tag': '1.*' } - using vim-polyglot
" Plug 'HerringtonDarkholme/yats.vim'  " Typescript syntax - using vim-polyglot
" Plug 'ianks/vim-tsx' " Possible indentation issues with TSX
" Plug 'mhartington/nvim-typescript', {'do': './install.sh'} " Typescript deoplete integration

Plug 'ryanoasis/vim-devicons'

call plug#end()


"" various settings
silent !mkdir -p $HOME/.vim/swapfiles
syntax enable
set clipboard+=unnamed
set conceallevel=0
set directory=$HOME/.vim/swapfiles//
set number
filetype plugin indent on
set tabstop=2
set shiftwidth=2
set expandtab ts=2 sw=2 ai
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
set hidden
set background=dark
if has('nvim')
  set diffopt=filler,internal,algorithm:histogram,indent-heuristic
endif
set ignorecase
set smartcase
set mouse=a
set encoding=UTF-8
set spelllang=en_us
set spellfile=$DOTFILES/vim/spell/utf-8.add
" set guifont=FuraCode\ Nerd\ Font:h11
set guifont=Hack\ Nerd\ Font:h12
" auto-wrap at textwidth while typing
set formatoptions+=t

" set status bar to two lines
set cmdheight=2<commit_msg>Fix disable mouse for neovim 0.8.0<commit_after>" Functions that have to load first
"
" vim-markdown-composer
function! BuildComposer(info)
  if a:info.status != 'unchanged' || a:info.force
    if has('nvim')
      !cargo build --release --locked
    else
      !cargo build --release --locked --no-default-features --features json-rpc
    endif
  endif
endfunction

" Python
" Follow python virtualenvs provider instructions to setup:
" https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim
" https://neovim.io/doc/user/provider.html
let g:python_host_prog = expand('~/.pyenv/versions/py2nvim/bin/python')
let g:python3_host_prog = expand('~/.pyenv/versions/py3nvim/bin/python')


call plug#begin('~/.local/share/nvim/plugged')

" Themes
Plug 'altercation/vim-colors-solarized'
Plug 'lifepillar/vim-solarized8'
Plug 'lifepillar/vim-colortemplate'
Plug 'Rigellute/rigel'
Plug 'nanotech/jellybeans.vim'
Plug 'joshdick/onedark.vim'
Plug 'challenger-deep-theme/vim', { 'as': 'challenger-deep' }

" Plug 'file://'.expand('~/dev/twodark.vim'), { 'branch': 'dev' }
" Plug 'file://'.expand('~/dev/rigel'), { 'branch': 'dev' }

" Misc
Plug 'itchyny/lightline.vim'
Plug 'maximbaz/lightline-ale'
Plug 'tribou/vim-buftabline'
Plug 'jiangmiao/auto-pairs'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'junegunn/vim-easy-align'
Plug 'junegunn/vim-peekaboo'
Plug 'preservim/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] }
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'tpope/vim-eunuch'
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
"Plug 'tpope/vim-sensible'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-ragtag'
Plug 'tpope/vim-repeat'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-commentary'
Plug 'tpope/vim-dispatch'
Plug 'radenling/vim-dispatch-neovim'
Plug 't9md/vim-surround_custom_mapping'
Plug 'tpope/vim-speeddating'
Plug 'tpope/vim-dotenv'
Plug 'mileszs/ack.vim'
Plug 'justinmk/vim-sneak'
" Plug 'junegunn/rainbow_parentheses.vim'
Plug 'mbbill/undotree'
Plug 'janko/vim-test'
Plug 'benmills/vimux'
Plug 'sk1418/HowMuch'

" Debugging
Plug 'vim-vdebug/vdebug', { 'on': 'VdebugStart' }

" Auto-formatting
Plug 'editorconfig/editorconfig-vim', { 'commit': '68f8136d2b018bfa9b23403e87d3d65bc942cbc3' }
" Using this only for the manual :Prettier command
Plug 'prettier/vim-prettier', {
  \ 'do': 'yarn install',
  \ 'for': ['javascript', 'javascript.jsx', 'typescript', 'typescriptreact', 'css', 'less', 'scss', 'json', 'graphql', 'markdown', 'vue', 'yaml', 'html'] }

" Auto-complete
Plug 'dense-analysis/ale', { 'tag': 'v3.*' }
" coc.nvim and vscode-compatible extensions
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'neoclide/coc-tsserver', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-tslint-plugin', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-css', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-highlight', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-json', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-git', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-snippets', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-eslint', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-sources', {'rtp': 'packages/emoji', 'do': 'yarn install --frozen-lockfile'}
" Plug 'neoclide/coc-emmet', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-solargraph', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-yaml', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-html', {'do': 'yarn install --frozen-lockfile'}
Plug 'neoclide/coc-lists', {'do': 'yarn install --frozen-lockfile'}
Plug 'iamcco/coc-svg', {'do': 'yarn install --frozen-lockfile'}
Plug 'amiralies/coc-elixir', {'do': 'yarn install --frozen-lockfile'}
Plug 'andys8/vscode-jest-snippets', {'do': 'npm ci'}
" Plug 'flowtype/flow-for-vscode', {'do': 'yarn install --frozen-lockfile'}
Plug 'github/copilot.vim', {'branch': 'release'}

" TODO: test ncm2 for autocompletion
" Plug 'ncm2/ncm2'
" ncm2: you need to install completion sources to get completions. Check
" our wiki page for a list of sources: https://github.com/ncm2/ncm2/wiki
" Plug 'ncm2/ncm2-bufword'
" Plug 'ncm2/ncm2-tmux'
" Plug 'ncm2/ncm2-path'

" Misc syntax
" TODO: test vim-polyglot and remove most other syntax plugins
Plug 'sheerun/vim-polyglot'
Plug 'tpope/vim-liquid'
Plug 'neoclide/jsonc.vim'

" Other JS/CSS/HTML
" Plug 'mattn/emmet-vim', { 'for': ['css', 'html'] }
Plug 'JulesWang/css.vim'
" Plug 'cakebaker/scss-syntax.vim' - vim-polyglot
" Plug 'wavded/vim-stylus' - vim-polyglot
Plug 'mustache/vim-mustache-handlebars'

" Markdown
Plug 'euclio/vim-markdown-composer', {
  \ 'do': function('BuildComposer'),
  \ 'for': ['markdown'],
  \ }

"" Golang
Plug 'fatih/vim-go', {
  \ 'tag': '*', 'do': ':GoInstallBinaries',
  \ 'for': ['go'],
  \ }

"" HashiCorp
"Plug 'hashivim/vim-consul'
"Plug 'hashivim/vim-nomadproject'
"Plug 'hashivim/vim-ottoproject'
"Plug 'hashivim/vim-packer'
"Plug 'hashivim/vim-terraform'
"Plug 'hashivim/vim-vagrant'
"Plug 'hashivim/vim-vaultproject'

"" Other Languages
"Plug 'docker/docker', { 'branch': '1.12.x', 'rtp': 'contrib/syntax/vim' }
" Plug 'elixir-lang/vim-elixir' - vim-polyglot
" Plug 'vim-scripts/nginx.vim' - vim-polyglot
"Plug 'apple/swift', { 'branch': 'swift-2.3-branch', 'rtp': 'utils/vim' }
" Plug 'cespare/vim-toml' - vim-polyglot
"Plug 'chrisbra/unicode.vim'

" JavaScript
"Plug 'jelera/vim-javascript-syntax', { 'tag': '*' }
"Plug 'bigfish/vim-js-context-coloring'
" Plug 'kchmck/vim-coffee-script' - vim-polyglot
Plug 'heavenshell/vim-jsdoc'
"Plug 'aaronj1335/underscore-templates.vim'
" Plug '~/dev/vim-syntax-js'
" Plug 'pangloss/vim-javascript', { 'tag': '1.2.*' } - vim-polyglot
" Plug 'mxw/vim-jsx' - using vim-polyglot
" Plug 'jparise/vim-graphql', { 'tag': '1.*' } - using vim-polyglot
" Plug 'HerringtonDarkholme/yats.vim'  " Typescript syntax - using vim-polyglot
" Plug 'ianks/vim-tsx' " Possible indentation issues with TSX
" Plug 'mhartington/nvim-typescript', {'do': './install.sh'} " Typescript deoplete integration

Plug 'ryanoasis/vim-devicons'

call plug#end()


"" various settings
silent !mkdir -p $HOME/.vim/swapfiles
syntax enable
set clipboard+=unnamed
set conceallevel=0
set directory=$HOME/.vim/swapfiles//
set number
filetype plugin indent on
set tabstop=2
set shiftwidth=2
set expandtab ts=2 sw=2 ai
set listchars=eol:$,tab:>-,trail:~,extends:>,precedes:<
set hidden
set background=dark
if has('nvim')
  set diffopt=filler,internal,algorithm:histogram,indent-heuristic
endif
set ignorecase
set smartcase
set mouse=
set encoding=UTF-8
set spelllang=en_us
set spellfile=$DOTFILES/vim/spell/utf-8.add
" set guifont=FuraCode\ Nerd\ Font:h11
set guifont=Hack\ Nerd\ Font:h12
" auto-wrap at textwidth while typing
set formatoptions+=t

" set status bar to two lines
set cmdheight=2
{'fraction_non_alphanumeric': 0.17919655667144907, 'fraction_numerical': 0.01054519368723099, 'mean_word_length': 4.937393526405452, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '2286095', 'n_tokens_mistral': 6072, 'n_tokens_neox': 5438, 'n_words': 1132}