wookayin / dotfiles

:house: Personal dotfiles for *NIX systems
https://dotfiles.wook.kr/
MIT License
361 stars 105 forks source link

Migrate to lazy.nvim plugin manager #44

Closed wookayin closed 1 year ago

wookayin commented 1 year ago

Migrate from vim-plug to lazy.nvim plugin manager.

Neovim 0.8.0 will be required. See the commit messages for more details.

Why?

wookayin commented 1 year ago

Merged. Migration of plugins config will be done gradually in the subsequent commits.

wookayin commented 1 year ago

Note: UIEnter happens before VimEnter. Plugins that can be loaded lazily should be triggered on VeryLazy which happens after VimEnter and the UI is drawn for the first time. See 20674aea85b0efa72a6bba3b14c4558302ef1e3a.

Profiling & Benchmark Performance improvement measured by `:StartupTime` (1) Linux, a slow machine; nvim v0.9.1 Before: ~ 230 ms startup: 228.1 event time percent plot init.lua 77.28 34.54 ██████████████████████████ config.plugins 45.31 20.25 ███████████████▎ UIEnter autocommands 45.07 20.14 ███████████████▏ config.treesitter 38.61 17.26 █████████████ .vimrc 8.37 3.74 ██▉ ... After: ~ 110 ms (2x faster) startup: 110.1 event time percent plot init.lua 79.21 71.92 ██████████████████████████ config.plugins 45.68 41.48 ███████████████ UIEnter autocommands 9.85 8.94 ███▎ .vimrc 8.33 7.56 ██▊ ... (2) macOS (M1 Pro); nvim v0.9.2 Before: ~ 120 ms startup: 118.6 event time percent plot init.lua 51.68 43.57 ██████████████████████████ config.plugins 25.64 21.62 ████████████▉ UIEnter autocommands 14.92 12.58 ███████▌ reading ShaDa 12.05 10.16 ██████▏ config.treesitter 7.15 6.03 ███▋ .vimrc 4.72 3.98 ██▍ After : ~ 80 ms (1.5x faster) startup: 78.1 event time percent plot init.lua 50.93 65.18 ██████████████████████████ config.plugins 25.46 32.59 █████████████ reading ShaDa 12.19 15.61 ██████▎ UIEnter autocommands 4.75 6.07 ██▍ .vimrc 4.13 5.28 ██▏ Note that the time to process UIEnter autocommands (lazy-loading plugins) have been reduced significantly.