2019-08-24 16:05:09 +00:00
|
|
|
let g:nvim_dotfiles_dir = expand('<sfile>:p:h')
|
2019-04-21 11:42:15 +00:00
|
|
|
|
2019-06-20 23:27:47 +00:00
|
|
|
let g:vim_ide = get(g:, 'vim_ide', 0)
|
|
|
|
|
2019-12-15 18:39:36 +00:00
|
|
|
let &runtimepath = g:nvim_dotfiles_dir.','.&runtimepath.','.g:nvim_dotfiles_dir.'/after'
|
2019-09-05 21:37:09 +00:00
|
|
|
|
2019-04-21 11:42:15 +00:00
|
|
|
|
2019-12-15 20:17:10 +00:00
|
|
|
let s:vim_config_dir = expand('~/.config/nvim')
|
|
|
|
let s:vim_plug_script = s:vim_config_dir . '/autoload/plug.vim'
|
|
|
|
let s:vim_plug_home = s:vim_config_dir . '/plugged'
|
|
|
|
|
|
|
|
let s:just_installed_vim_plug = 0
|
|
|
|
if !filereadable(s:vim_plug_script)
|
|
|
|
execute '!curl -fL https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim --create-dirs -o' shellescape(s:vim_plug_script)
|
|
|
|
autocmd VimEnter * PlugInstall --sync
|
|
|
|
endif
|
|
|
|
|
|
|
|
call plug#begin(s:vim_config_dir . '/plugged')
|
|
|
|
|
|
|
|
Plug 'junegunn/vim-plug'
|
|
|
|
|
|
|
|
" Files {{{
|
|
|
|
Plug 'tpope/vim-eunuch'
|
|
|
|
if g:vim_ide
|
|
|
|
Plug 'francoiscabrol/ranger.vim'
|
|
|
|
endif
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Editing {{{
|
|
|
|
Plug 'easymotion/vim-easymotion'
|
|
|
|
Plug 'junegunn/vim-easy-align'
|
|
|
|
Plug 'Raimondi/delimitMate'
|
|
|
|
Plug 'tpope/vim-repeat'
|
|
|
|
Plug 'tpope/vim-commentary'
|
|
|
|
Plug 'tpope/vim-surround'
|
|
|
|
Plug 'Yggdroot/indentLine'
|
|
|
|
Plug 'henrik/vim-indexed-search'
|
|
|
|
Plug 'andymass/vim-matchup'
|
|
|
|
Plug 'inkarkat/vim-ingo-library' " required by LineJuggler
|
|
|
|
Plug 'inkarkat/vim-LineJuggler', { 'branch': 'stable' }
|
|
|
|
Plug 'reedes/vim-pencil'
|
2020-01-17 18:33:06 +00:00
|
|
|
Plug 'ciaranm/detectindent'
|
2019-12-15 20:17:10 +00:00
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Text objects {{{
|
|
|
|
Plug 'kana/vim-textobj-user'
|
|
|
|
Plug 'kana/vim-textobj-entire'
|
|
|
|
Plug 'kana/vim-textobj-line'
|
|
|
|
Plug 'kana/vim-textobj-indent'
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" UI {{{
|
|
|
|
Plug 'moll/vim-bbye'
|
|
|
|
Plug 'gerw/vim-HiLinkTrace'
|
|
|
|
Plug 'vim-airline/vim-airline'
|
|
|
|
Plug 'tpope/vim-obsession'
|
|
|
|
Plug 'romainl/vim-qf'
|
|
|
|
if g:vim_ide
|
|
|
|
Plug 'dyng/ctrlsf.vim'
|
|
|
|
endif
|
|
|
|
" }}}
|
2019-09-05 21:37:09 +00:00
|
|
|
|
2019-12-15 20:17:10 +00:00
|
|
|
" Git {{{
|
|
|
|
Plug 'tpope/vim-fugitive'
|
|
|
|
Plug 'tpope/vim-rhubarb'
|
|
|
|
Plug 'airblade/vim-gitgutter'
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" FZF {{{
|
|
|
|
Plug 'junegunn/fzf', { 'do': './install --bin' }
|
|
|
|
Plug 'junegunn/fzf.vim'
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
" Programming {{{
|
|
|
|
Plug 'sheerun/vim-polyglot'
|
|
|
|
if g:vim_ide
|
|
|
|
Plug 'neoclide/coc.nvim', { 'do': 'yarn install' }
|
|
|
|
Plug 'dag/vim2hs'
|
|
|
|
endif
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
call plug#end()
|
|
|
|
|
|
|
|
" Automatically install/clean plugins (because I'm a programmer) {{{
|
|
|
|
augroup vimrc-plugins
|
|
|
|
autocmd!
|
|
|
|
autocmd VimEnter *
|
|
|
|
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
|
|
|
\| PlugInstall --sync | q
|
|
|
|
\| endif
|
|
|
|
augroup END
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
|
|
colorscheme dotfiles
|