Add installvimplugins script
This commit is contained in:
parent
f1317adff8
commit
fc24d65225
|
@ -0,0 +1,21 @@
|
|||
#/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
# Special case for fzf.vim plugin file:
|
||||
# Note: not currently updated automatically
|
||||
url="https://raw.githubusercontent.com/junegunn/fzf/master/plugin/fzf.vim"
|
||||
echo "Fetching $url..."
|
||||
mkdir -p $HOME/.vim/plugin
|
||||
curl -sL -o $HOME/.vim/plugin/fzf.vim https://raw.githubusercontent.com/junegunn/fzf/master/plugin/fzf.vim
|
||||
|
||||
# Relies on vimrc containing lines e.g.:
|
||||
# packadd! rust.vim " https://github.com/rust-lang/rust.vim.git
|
||||
|
||||
pluginhome=$HOME/.vim/pack/git-plugins/opt
|
||||
mkdir -p $pluginhome
|
||||
cd $pluginhome
|
||||
|
||||
grep packadd! $HOME/.vimrc | grep -oP 'https.*$' | while read -r url ; do
|
||||
echo "Cloning $url.."
|
||||
git clone --quiet --depth=1 "$url"
|
||||
done
|
44
vimrc
44
vimrc
|
@ -78,6 +78,7 @@ if exists('+termguicolors')
|
|||
endif
|
||||
|
||||
" Colour scheme:
|
||||
packadd! nord-vim " https://github.com/arcticicestudio/nord-vim.git
|
||||
colorscheme nord
|
||||
|
||||
augroup vimrc
|
||||
|
@ -145,7 +146,9 @@ nmap <silent> <leader>q :call ToggleQuickFix()<cr>
|
|||
nmap <silent> <leader>l :lclose<cr>
|
||||
|
||||
" deoplete configuration
|
||||
packadd! deoplete.nvim
|
||||
packadd! vim-hug-neovim-rpc " https://github.com/roxma/vim-hug-neovim-rpc.git
|
||||
packadd! nvim-yarp " https://github.com/roxma/nvim-yarp.git
|
||||
packadd! deoplete.nvim " https://github.com/Shougo/deoplete.nvim.git
|
||||
" Disable completion messages:
|
||||
set shortmess+=c
|
||||
let g:deoplete#enable_at_startup = 1
|
||||
|
@ -175,7 +178,7 @@ nmap <leader>b :Buffers<cr>
|
|||
nmap <leader>gg :Rg<cr>
|
||||
|
||||
" Lightline configuration:
|
||||
packadd! lightline.vim
|
||||
packadd! lightline.vim " https://github.com/itchyny/lightline.vim.git
|
||||
set laststatus=2
|
||||
|
||||
function! LightlineLSPErrorText()
|
||||
|
@ -232,7 +235,7 @@ let g:lightline = {
|
|||
\ }
|
||||
|
||||
" vim-gitgutter configuration
|
||||
packadd! vim-gitgutter
|
||||
packadd! vim-gitgutter " https://github.com/airblade/vim-gitgutter.git
|
||||
set signcolumn=yes
|
||||
nmap ]h <Plug>(GitGutterNextHunk)
|
||||
nmap [h <Plug>(GitGutterPrevHunk)
|
||||
|
@ -241,30 +244,18 @@ omap ah <Plug>(GitGutterTextObjectOuterPending)
|
|||
xmap ih <Plug>(GitGutterTextObjectInnerVisual)
|
||||
xmap ah <Plug>(GitGutterTextObjectOuterVisual)
|
||||
|
||||
" Vim-Rust configuration:
|
||||
let g:rustfmt_autosave = 1
|
||||
|
||||
" echodoc configuration:
|
||||
set cmdheight=1
|
||||
set noshowmode
|
||||
let g:echodoc#type='echo'
|
||||
let g:echodoc#enable_at_startup = 1
|
||||
packadd! echodoc.vim
|
||||
|
||||
" vim-fugitive
|
||||
" load before LSP to ensure it doesn't clobber signcolumn
|
||||
packadd! vim-fugitive
|
||||
packadd! vim-fugitive " https://github.com/tpope/vim-fugitive.git
|
||||
|
||||
" vim-go
|
||||
" Doesn't work in after/ftplugin/go.vim:
|
||||
let g:go_def_mapping_enabled = 0
|
||||
" load before LSP to ensure it doesn't clobber mappings
|
||||
packadd! vim-go
|
||||
packadd! vim-go " https://github.com/fatih/vim-go.git
|
||||
|
||||
" LSP configuration:
|
||||
packadd! vim-lsp
|
||||
packadd! vim-lsp-settings
|
||||
packadd! deoplete-vim-lsp
|
||||
packadd! vim-lsp " https://github.com/prabirshrestha/vim-lsp.git
|
||||
packadd! vim-lsp-settings " https://github.com/mattn/vim-lsp-settings.git
|
||||
packadd! deoplete-vim-lsp " https://github.com/lighttiger2505/deoplete-vim-lsp.git
|
||||
|
||||
let g:lsp_settings = {
|
||||
\ 'gopls': {
|
||||
|
@ -343,11 +334,14 @@ augroup END
|
|||
runtime macros/matchit.vim
|
||||
|
||||
" load other plugins:
|
||||
" packadd! tmux-complete.vim
|
||||
packadd! vim-commentary
|
||||
packadd! rust.vim " https://github.com/rust-lang/rust.vim.git
|
||||
packadd! tmux-complete.vim " https://github.com/wellle/tmux-complete.vim.git
|
||||
packadd! vim-commentary " https://github.com/tpope/vim-commentary.git
|
||||
|
||||
" Requires both fzf.vim plugin to be manually installed:
|
||||
" https://github.com/junegunn/fzf/blob/master/plugin/fzf.vim
|
||||
" and also this separate plugin, which is loaded here:
|
||||
packadd! fzf.vim
|
||||
packadd! vim-surround
|
||||
packadd! vim-yaml-folds
|
||||
packadd! fzf.vim " https://github.com/junegunn/fzf.vim.git
|
||||
packadd! vim-surround " https://github.com/tpope/vim-surround.git
|
||||
packadd! vim-rhubarb " https://github.com/tpope/vim-rhubarb.git
|
||||
packadd! editorconfig-vim " https://github.com/editorconfig/editorconfig-vim.git
|
||||
|
|
Loading…
Reference in New Issue