nvim: init.vim: Improve startup time

https://github.com/hyiltiz/vim-plugins-profile
Use vim-plug lazy loading functionality to decrease start time.
erlang tags plugin seems to have been the major culprit.

Before:
python3 vim-plugins-profile.py -p nvim
Running nvim to generate startup logs... done.
Loading and processing logs... done.
Plugin directory: /home/sanchayan/.config/nvim/plugged
=====================================
Top 10 plugins slowing nvim's startup
=====================================
1        54.910   vim-erlang-tags
2         5.667   vim-sexp
3         4.000   vim-airline
4         3.672   vim-easymotion
5         3.433   nerdcommenter
6         2.914   neomake
7         1.884   vim-monokai
8         1.448   vim-gitgutter
9         0.968   vimtex
10        0.896   vim-fugitive
=====================================
Plotting result... done.

After:
python3 vim-plugins-profile.py -p nvim
Running nvim to generate startup logs... done.
Loading and processing logs... done.
Plugin directory: /home/sanchayan/.config/nvim/plugged
=====================================
Top 10 plugins slowing nvim's startup
=====================================
1         4.697   vim-airline
2         3.705   vim-easymotion
3         3.354   nerdcommenter
4         3.101   neomake
5         1.892   vim-monokai
6         1.599   vim-gitgutter
7         0.909   vim-fugitive
8         0.869   vimtex
9         0.630   supertab
10        0.491   deoplete.nvim
=====================================
Plotting result... done.
This commit is contained in:
Sanchayan Maity 2019-12-03 15:00:29 +05:30 committed by Sanchayan Maity
parent ff65606652
commit a3501508ba

View file

@ -37,39 +37,40 @@ Plug 'rbong/vim-flog'
Plug 'vim-utils/vim-husk'
" Tags
Plug 'sk1418/QFGrep'
Plug 'steffanc/cscopemaps.vim'
Plug 'ludovicchabant/vim-gutentags'
Plug 'steffanc/cscopemaps.vim', { 'for': 'c' }
Plug 'ludovicchabant/vim-gutentags', { 'for': 'c' }
Plug 'deoplete-plugins/deoplete-tag'
" GDB
Plug 'sakhnik/nvim-gdb', { 'do': ':UpdateRemotePlugins' }
" Lisp
Plug 'guns/vim-sexp'
Plug 'tpope/vim-sexp-mappings-for-regular-people'
Plug 'junegunn/rainbow_parentheses.vim'
Plug 'guns/vim-sexp', { 'for': [ 'scheme', 'lisp', 'clojure' ] }
Plug 'tpope/vim-sexp-mappings-for-regular-people', { 'for': [ 'scheme', 'lisp', 'clojure' ] }
Plug 'junegunn/rainbow_parentheses.vim', { 'for': [ 'scheme', 'lisp', 'clojure' ] }
Plug 'Olical/vim-scheme', { 'for': 'scheme', 'on': 'SchemeConnect' }
" Haskell
Plug 'ekmett/haskell-vim', { 'for': [ 'haskell', 'cabal' ] }
Plug 'neomake/neomake'
Plug 'ndmitchell/ghcid', { 'rtp': 'plugins/nvim' }
Plug 'Twinside/vim-hoogle'
Plug 'Twinside/vim-hoogle', { 'for': 'haskell' }
Plug 'hspec/hspec.vim'
Plug 'zenzike/vim-haskell-unicode', { 'for': 'haskell' }
" For Nix
Plug 'LnL7/vim-nix', { 'for': 'nix' }
" For autocompletion
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
" For Python
Plug 'zchee/deoplete-jedi'
Plug 'numirias/semshi', { 'do': ':UpdateRemotePlugins' }
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
Plug 'numirias/semshi', { 'for': 'python', 'do': ':UpdateRemotePlugins' }
" Autocomplete for Rust
Plug 'sebastianmarkow/deoplete-rust'
Plug 'sebastianmarkow/deoplete-rust', { 'for': 'rust' }
Plug 'cespare/vim-toml', { 'for': 'rust' }
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
Plug 'mhinz/vim-crates'
" Erlang Support
Plug 'vim-erlang/vim-erlang-tags'
Plug 'vim-erlang/vim-erlang-runtime'
Plug 'vim-erlang/vim-erlang-omnicomplete'
Plug 'vim-erlang/vim-erlang-compiler'
Plug 'vim-erlang/vim-erlang-tags', { 'for': 'erlang' }
Plug 'vim-erlang/vim-erlang-runtime', { 'for': 'erlang' }
Plug 'vim-erlang/vim-erlang-omnicomplete', { 'for': 'erlang' }
Plug 'vim-erlang/vim-erlang-compiler', { 'for': 'erlang' }
" Miscellaneous
Plug 'tpope/vim-surround'
Plug 'tpope/vim-repeat'
@ -85,7 +86,6 @@ Plug 'yuttie/comfortable-motion.vim'
Plug 'lifecrisis/vim-difforig'
Plug 'dag/vim-fish'
Plug 'pbrisbin/vim-syntax-shakespeare'
Plug 'zenzike/vim-haskell-unicode'
Plug 'lifepillar/pgsql.vim'
Plug 'purescript-contrib/purescript-vim'
Plug 'mbbill/undotree'