From b6f577d9ff1ca524d0c68806af79e5ceecc5a5ab Mon Sep 17 00:00:00 2001 From: Oliver Ladner Date: Wed, 2 Apr 2025 14:32:59 +0200 Subject: [PATCH] fix: slightly improve startup times --- README.md | 14 +++++++------- lua/weeheavy/plugins/ccc.lua | 2 ++ lua/weeheavy/plugins/lsp/blink.lua | 2 ++ 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 789f0bb..cf00063 100644 --- a/README.md +++ b/README.md @@ -36,19 +36,19 @@ macOS 15 on Neovim 0.11.0. Around 15% of the plugins are lazy-loaded. ```bash -LazyStart 14.64ms -LazyDone 59.11ms (+44.48ms) -UIEnter 119.52ms (+60.41ms) +LazyStart 18.67ms +LazyDone 43.52ms (+24.85ms) +UIEnter 110.71ms (+67.19ms) ``` ### Starting with an empty file -Around 40% of the plugins are lazy-loaded. +Around 50% of the plugins are lazy-loaded. ```bash -LazyStart 14.37ms -LazyDone 60.18ms (+45.81ms) -UIEnter 74.45ms (+14.27ms) +LazyStart 18.15ms +LazyDone 46.91ms (+28.76ms) +UIEnter 59.08ms (+12.17ms) ``` ## Plugins diff --git a/lua/weeheavy/plugins/ccc.lua b/lua/weeheavy/plugins/ccc.lua index efcfc48..0d1c67b 100644 --- a/lua/weeheavy/plugins/ccc.lua +++ b/lua/weeheavy/plugins/ccc.lua @@ -2,6 +2,8 @@ -- https://github.com/uga-rosa/ccc.nvim return { "uga-rosa/ccc.nvim", + lazy = true, + event = { "BufReadPre", "BufNewFile" }, config = function() local ccc = require("ccc") local mapping = ccc.mapping diff --git a/lua/weeheavy/plugins/lsp/blink.lua b/lua/weeheavy/plugins/lsp/blink.lua index 7b098d3..0f7296a 100644 --- a/lua/weeheavy/plugins/lsp/blink.lua +++ b/lua/weeheavy/plugins/lsp/blink.lua @@ -1,5 +1,7 @@ return { "saghen/blink.cmp", + lazy = true, + event = { "BufReadPre", "BufNewFile" }, -- optional: provides snippets for the snippet source dependencies = { "rafamadriz/friendly-snippets" },