dotfiles/nvim/init.vim

38 lines
1.1 KiB
VimL
Raw Normal View History

2019-08-24 16:05:09 +00:00
let g:nvim_dotfiles_dir = expand('<sfile>:p:h')
2019-06-20 23:27:47 +00:00
let g:vim_ide = get(g:, 'vim_ide', 0)
let g:vim_ide_treesitter = get(g:, 'vim_ide_treesitter', 0)
2019-06-20 23:27:47 +00:00
let &runtimepath = g:nvim_dotfiles_dir.','.&runtimepath.','.g:nvim_dotfiles_dir.'/after'
2020-01-19 23:30:23 +00:00
let s:vim_config_dir = stdpath("config")
2019-12-15 20:17:10 +00:00
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_plug_home)
2019-12-15 20:17:10 +00:00
Plug 'junegunn/vim-plug'
runtime! dotfiles/plugins-list.vim
2019-12-15 20:17:10 +00:00
call plug#end()
if g:vim_ide_treesitter
runtime! dotfiles/treesitter.vim
endif
2019-12-15 20:17:10 +00:00
" 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