aboutsummaryrefslogtreecommitdiff
path: root/.vim/after
diff options
context:
space:
mode:
authorGuangxiong Lin <[email protected]>2022-04-02 11:50:48 +0800
committerGuangxiong Lin <[email protected]>2022-04-02 11:50:48 +0800
commit8d609914cccb9b27e78b6c413b83b9cd524ccde9 (patch)
treea00d3b35b70aa3e3dbcd0854cc22d0803fca9a48 /.vim/after
parent18cea62a33b912ea32374bfdbed1e5af726575a6 (diff)
downloaddotfiles-8d609914cccb9b27e78b6c413b83b9cd524ccde9.tar.gz
dotfiles-8d609914cccb9b27e78b6c413b83b9cd524ccde9.tar.bz2
dotfiles-8d609914cccb9b27e78b6c413b83b9cd524ccde9.zip
Use minpac to maintain package in vim
Diffstat (limited to '.vim/after')
-rw-r--r--.vim/after/plugin/minpac.vim78
1 files changed, 78 insertions, 0 deletions
diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim
new file mode 100644
index 0000000..9dde72d
--- /dev/null
+++ b/.vim/after/plugin/minpac.vim
@@ -0,0 +1,78 @@
+let g:minpac_initialized = 0
+
+function! InitMinpac() abort
+ if g:minpac_initialized
+ return
+ endif
+
+ if empty(glob('~/.vim/pack/vendor/opt/minpac'))
+ silent !git clone https://github.com/k-takata/minpac.git
+ \ ~/.vim/pack/vendor/opt/minpac/
+ endif
+
+ packadd minpac
+ call minpac#init({'package_name': 'vendor'})
+
+ call minpac#add('https://github.com/k-takata/minpac', {'type': 'opt'})
+
+ call minpac#add('https://github.com/ycm-core/YouCompleteMe',
+ \ {'do': function('s:build_ycm')})
+ call minpac#add('https://github.com/tpope/vim-commentary')
+
+ call minpac#add('https://github.com/SirVer/ultisnips.git')
+ call minpac#add('https://github.com/honza/vim-snippets')
+
+ call minpac#add('https://github.com/mcchrish/nnn.vim.git')
+ call minpac#add('https://github.com/junegunn/fzf.git')
+ call minpac#add('https://github.com/junegunn/fzf.vim.git', {'type': 'opt'})
+ call minpac#add('https://github.com/mbbill/undotree.git')
+ call minpac#add('https://github.com/dense-analysis/ale.git')
+ call minpac#add('https://github.com/tpope/vim-eunuch.git')
+ call minpac#add('https://github.com/tpope/vim-sleuth.git')
+ call minpac#add('https://github.com/godlygeek/tabular.git')
+ call minpac#add('https://github.com/airblade/vim-rooter.git')
+ call minpac#add('https://github.com/ludovicchabant/vim-gutentags.git')
+ call minpac#add('https://github.com/easymotion/vim-easymotion.git')
+ call minpac#add('https://github.com/editorconfig/editorconfig-vim.git')
+ call minpac#add('https://github.com/habamax/vim-godot.git')
+ call minpac#add('https://github.com/ledger/vim-ledger.git')
+ call minpac#add('https://github.com/mhinz/vim-signify.git')
+ call minpac#add('https://github.com/tpope/vim-unimpaired.git')
+ call minpac#add('https://github.com/tpope/vim-surround.git')
+ call minpac#add('https://github.com/tpope/vim-rsi.git')
+ call minpac#add('https://github.com/tpope/vim-dispatch.git')
+ call minpac#add('https://github.com/axvr/org.vim.git')
+ call minpac#add('https://github.com/dhruvasagar/vim-table-mode.git')
+
+ call minpac#add('https://github.com/voldikss/vim-floaterm.git')
+
+ " git
+ call minpac#add('https://github.com/tpope/vim-fugitive.git')
+ call minpac#add('https://github.com/rbong/vim-flog.git')
+ call minpac#add('https://github.com/iberianpig/tig-explorer.vim')
+
+ " appearance
+ call minpac#add('https://github.com/joshdick/onedark.vim.git', {'type': 'opt'})
+ call minpac#add('https://github.com/vim-airline/vim-airline.git')
+ call minpac#add('https://github.com/vim-airline/vim-airline-themes.git')
+
+ " chinese input method
+ call minpac#add('https://github.com/lilydjwg/fcitx.vim.git', {'type': 'opt'})
+ call minpac#add('https://github.com/ybian/smartim.git', {'type': 'opt'})
+
+ let g:minpac_initialized = 1
+endfunction
+
+command! MinpacUpdate source $MYVIMRC | call InitMinpac() | call minpac#update()
+command! MinpacClean source $MYVIMRC | call InitMinpac() | call minpac#clean()
+command! MinpacStatus call InitMinpac() | call minpac#status()
+
+function! s:build_ycm(hooktype, name)
+ let ycm_install_options = ' --clangd-completer'
+
+ if executable('go')
+ let ycm_install_options = ycm_install_options . ' --go-completer'
+ endif
+
+ exec '!python3 ./install.py' . ycm_install_options
+endfunction