| 1 | " Declare plugin directory |
| 2 | let s:plugin_dir = expand('~/.vim/plugged') |
| 3 | |
| 4 | " Native plugin manager |
| 5 | function! s:ensure(repo) |
| 6 | let name = split(a:repo, '/')[-1] |
| 7 | let path = s:plugin_dir . '/' . name |
| 8 | |
| 9 | if !isdirectory(path) |
| 10 | if !isdirectory(s:plugin_dir) |
| 11 | call mkdir(s:plugin_dir, 'p') |
| 12 | endif |
| 13 | execute '!git clone --depth=1 https://github.com/' . a:repo . ' ' . shellescape(path) |
| 14 | endif |
| 15 | |
| 16 | execute 'set runtimepath+=' . fnameescape(path) |
| 17 | endfunction |
| 18 | |
| 19 | " Plugins |
| 20 | call s:ensure('junegunn/fzf') |
| 21 | call s:ensure('junegunn/fzf.vim') |
| 22 | call s:ensure('itchyny/lightline.vim') |
| 23 | call s:ensure('yegappan/lsp') |
| 24 | call s:ensure('tpope/vim-fugitive') |
| 25 | call s:ensure('airblade/vim-gitgutter') |
| 26 | call s:ensure('christoomey/vim-tmux-navigator') |
| 27 | |
| 28 | " Colorscheme |
| 29 | call s:ensure('stevedylandev/darkmatter-nvim') |
| 30 | colorscheme darkmatter |