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