Created
January 3, 2020 10:08
-
-
Save hacolab/d467358251a723a4b7b73172a2c09861 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Direcotry path | |
let s:config_dir=empty($XDG_CONFIG_HOME) ? expand('$HOME/.config/nvim') : expand($XDG_CONFIG_HOME) | |
let s:data_dir=empty($XDG_DATA_HOME) ? expand('$HOME/.local/share/nvim') : expand($XDG_DATA_HOME) | |
" Plugins | |
" ---------------------------- | |
augroup PluginInstall | |
autocmd! | |
autocmd VimEnter * if dein#check_install() | call dein#install() | endif | |
augroup END | |
command! -nargs=0 PluginUpdate call dein#update() | |
let s:dein_dir = s:data_dir . '/dein' | |
if &runtimepath !~# '/dein.vim' | |
let s:dein_repo = 'github.com/Shougo/dein.vim' | |
let s:dein_repo_dir = s:dein_dir . '/repos/' . s:dein_repo | |
if !isdirectory(s:dein_repo_dir) | |
execute printf('!git clone %s %s', 'https://' . s:dein_repo, s:dein_repo_dir) | |
endif | |
execute 'set runtimepath^=' . s:dein_repo_dir | |
endif | |
let g:dein#install_pax_processed = 48 | |
let s:toml_file = s:config_dir . '/dein.toml' | |
let s:toml_lazy_file = s:config_dir . '/dein_lazy.toml' | |
if dein#load_state(s:dein_dir) | |
call dein#begin(s:dein_dir) | |
call dein#load_toml(s:toml_file, {'lazy': 0}) | |
call dein#load_toml(s:toml_lazy_file, {'lazy': 1}) | |
call dein#end() | |
call dein#save_state() | |
endif | |
filetype plugin indent on | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment