add lazy loading to many plugins

This commit is contained in:
Marty Oehme 2019-03-21 00:06:40 +01:00
parent f479ae759c
commit 0e21be8abc

View file

@ -42,7 +42,7 @@ Plug 'christoomey/vim-tmux-navigator'
" into / out of focus (requires number & relativenumber to be set) " into / out of focus (requires number & relativenumber to be set)
Plug 'jeffkreeftmeijer/vim-numbertoggle' Plug 'jeffkreeftmeijer/vim-numbertoggle'
" Workflow " " Workflow
Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc with gc Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc with gc
Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch
Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add) Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add)
@ -51,32 +51,44 @@ Plug 'kana/vim-textobj-user' " dependency for most other textobj plugins
Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection
" and allows you to jump to the *end* of this <g)> or last <g(> sentence. " and allows you to jump to the *end* of this <g)> or last <g(> sentence.
Plug 'jiangmiao/auto-pairs' " Auto close brackets and ''
" Ecosystem " " Ecosystem
" Plug 'tpope/vim-fugitive' - Will have to take a closer look some other time " " Plug 'tpope/vim-fugitive' - Will have to take a closer look some other time
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " show a directory listing within vim Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } " show a directory listing within vim
Plug 'Xuyuanp/nerdtree-git-plugin' " show git status in nerdtree for files and dirs Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' } " show git status in nerdtree for files and dirs
Plug 'Yggdroot/LeaderF' " fuzzy matcher, apparently faster than fzf, ctrlp, unit, denite Plug 'Yggdroot/LeaderF', { 'on': ['Leaderf', 'LeaderfFile', 'LeaderfBuffer'], 'do': './install.sh' } " fuzzy matcher, apparently faster than fzf, ctrlp, unit, denite
" Language Integration " Language Integration
Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language
Plug 'stephpy/vim-yaml' Plug 'stephpy/vim-yaml'
Plug 'mhartington/nvim-typescript', {'do': './install.sh'} Plug 'mhartington/nvim-typescript', {'for': 'typescript','do': './install.sh'}
" HTML Workflow " HTML Workflow
Plug 'valloric/matchtagalways' Plug 'valloric/matchtagalways', { 'on': [] }
Plug 'alvan/vim-closetag' Plug 'alvan/vim-closetag', { 'on': [] }
Plug 'jiangmiao/auto-pairs', { 'on': [] } " Auto close brackets and ''
augroup load_html_utils
autocmd!
autocmd InsertEnter * call plug#load('matchtagalways', 'vim-closetag', 'auto-pairs')
\| autocmd! load_html_utils
augroup END
" Markdown & Prose Workflow " Markdown & Prose Workflow
Plug 'reedes/vim-pencil' " provide md convenience functions like hard/softwrap Plug 'reedes/vim-pencil', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " provide md convenience functions like hard/softwrap
Plug 'junegunn/goyo.vim' " provide distraction free writing Plug 'junegunn/goyo.vim', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " provide distraction free writing
Plug 'junegunn/limelight.vim' " provide even distraction free-er writing (lowlight paragraphs) Plug 'junegunn/limelight.vim', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " provide even distraction free-er writing (lowlight paragraphs)
Plug 'rhysd/vim-grammarous' " integrate vim with languagetool for grammar checking (needs java8) Plug 'rhysd/vim-grammarous', { 'for': ['mkd', 'txt'], 'on': 'Goyo' } " integrate vim with languagetool for grammar checking (needs java8)
" For async completion " For async completion
Plug 'Shougo/deoplete.nvim' " automatic suggestions, can also perhaps be changed for newer plugs Plug 'Shougo/deoplete.nvim', { 'on': [] } " automatic suggestions, can also perhaps be changed for newer plugs
Plug 'w0rp/ale' " asynchronous linting - might be superseded by lsp or coc.nvim at some point Plug 'w0rp/ale', { 'on': [] } " asynchronous linting - might be superseded by lsp or coc.nvim at some point
" lazy loading since they require a lot of startup time
augroup load_ide_features
autocmd!
autocmd InsertEnter * call plug#load('ale', 'deoplete.nvim')
\| autocmd! load_ide_features
autocmd InsertEnter * call deoplete#enable()
augroup END
" Design " Design
Plug 'vim-airline/vim-airline' Plug 'vim-airline/vim-airline'
@ -167,7 +179,7 @@ autocmd! User GoyoLeave nested call <SID>goyo_leave()
" PLUGIN: DEOPLETE " PLUGIN: DEOPLETE
" enable deoplete at startup " enable deoplete at startup
let g:deoplete#enable_at_startup = 1 let g:deoplete#enable_at_startup = 0
let g:deoplete#enable_ignore_case = 1 let g:deoplete#enable_ignore_case = 1
let g:deoplete#enable_smart_case = 1 let g:deoplete#enable_smart_case = 1
let g:deoplete#enable_camel_case = 1 let g:deoplete#enable_camel_case = 1
@ -318,6 +330,9 @@ nnoremap <silent> <leader>Q vapJgqap
" Enter distraction free prose mode with F11 " Enter distraction free prose mode with F11
noremap <F11> :Goyo<CR> noremap <F11> :Goyo<CR>
" Call leaderf with <leader-f> (necessary to enable leaderf lazyloading)
nnoremap <leader>f :LeaderfFile<cr>
" }}} " }}}
" ================================================================================ " ================================================================================
" END " END