My Neovim takes roughly 113ms to fire up. THIS IS FAST. However, I don’t lazy load anything. Being a Lazy.nvim user, it’s kind of a shame I’m not actually making use of my plugin manager's flagship feature. But then again, it takes 113ms for nvim to start, what is there to gain here? Let’s say I drop it to 50ms. Still reading? GOOD. You’re as crazy as I am, let’s speed things up! The Slow Startup StruggleThere are a few factors affecting startup times:
0. Lose redundant plugins!This cool plugin dropping your code on the ground like sand? Not helping you in the 99.99% times you’re not showing it off to a colleague. Don’t ask me how I know. Yeah this duck running around lines of code isn’t helping either. Cleanup useless plugins or those you're not really using anymore because you stopped working with Java. 1. Clock Your StartupFirst, let’s see how slow things really are: This creates a detailed log. Open the log and look for the total time at the bottom. This is our baseline. 2. Meet Your New Best Friend: LazyLazy isn’t just another plugin manager. It’s your speed demon sidekick. Install it, then use its built-in profiler:
This shows you the overall time it took to load things up, including a breakdown of the booting profile. Aside from Treesitter which I’m not necessarily going to touch first, UI enhancers like 3. Lazy Loading: Your Secret WeaponHere’s the key: Don’t load everything at once. Use Neovim events! Events are triggers, like opening a file or entering insert mode. Use them to load plugins only when needed. For example: Learn more about optional events with 4. Optimize the Heavy HittersFound some other plugins eating up time? Let’s tackle them:
5. Let me confuse youLazy loading isn’t always the best approach for every plugin in your system. While it can improve initial file opening times, it may introduce latency when you start interacting with the file and delay the appearance of diagnostics. Consider the user experience:
With this approach, you’ll slash startup times without sacrificing your favorite Neovim superpowers. Thank you for reading, as always, feel free to reply to this post directly with questions and comments! |
Every once in a while I send hand picked things I've learned. Kind of like your filter to the tech internet. No spam, I promise!
You’ve been parsing JSON wrong your whole life This issue is brought to you by: Secure Your AI Future at DevSecCon 2025 Software development is undergoing a seismic shift as AI transforms how we build, deploy, and secure applications. Register for the 1st-ever Global Community Summit on AI Security, covering critical strategies to empower AI innovation without compromising security. Register for DevSecCon 2025 (It’s Free!) Ever opened a massive “.log” file and realized it’s just one long,...
Wait… cURL can do WHAT?! Brought to you in collaboration with 1Password and Browserbase: 🔐 Your AI Agents Can Finally Log In! 1Password and Browserbase just partnered to solve AI’s biggest security nightmare: authentication without exposing credentials. Introducing 1Password’s Secure Agentic Autofill, allowing you to connect your 1Password Enterprise Password Manager to your browser automation agent powered by Browserbase. Build AI agents that can actually work without compromising security....
Postgres is not a database. For years, we’ve been taught to see Postgres as the reliable, open source workhorse for storing our data. Everyone called it "The Toyota of databases", you know... it just works. But to leave it at that is to miss the whole story.Postgres isn’t just a place to put your data, it’s a powerful development platform that can become the core of your entire backend, an operating system (yea, bold) for your application’s stack. Diving deep into its capabilities I learned...