r/LazyVim

My First Plugin! Docright.nvim - Local First AI code explainer
▲ 1 r/LazyVim+1 crossposts

My First Plugin! Docright.nvim - Local First AI code explainer

Docright is a Local first AI code explainer that that asks for short code documentations and allows you to follow up with your own questions, YES it lets you go down rabbit holes.

it's NOT an AI documentation tool, we have plenty of those.

Since its my first plugin, I would really appreciate if you tried it and any criticism or feedback is highly appreciated. Thank you to this community for being awesome!

github.com
u/MaximumAttitude7598 — 7 hours ago
▲ 0 r/LazyVim+1 crossposts

Careless plugin authors are creating serious issues with regard to CPU usage

I've just been down a rabbit hole using Gemini to analyze why my nvim setup is consuming so many CPU resources when idle. This is a huge issue - I could potentially have many instances of nvim open, and each one using up CPU cycles carelessly adds up to a serious waste of CPU cycles and heating. My laptop has been too hot for months, and now I finally know why.

The main culprit? Plugin authors are setting repeating timers of 33ms, 50ms or worse without realizing the implication - they're constantly waking up the CPU and turning sleep into effective busy waits.

So far I've found:

  • which-key sets a 50ms timer to bypass the lack of ModeChanged events on pre-0.10 Neovim. Completely unnecessary on 0.10+ and done without a version check.
  • noice sets an indefinite 33ms timer on bootup.
  • snacks' statuscolumn plugin runs a 50ms timer to refresh the status rather than responding to events.
  • lualine sets a 50ms/16ms(!) timer by default.

All of these are included in Lazyvim, meaning that if you use Lazyvim, you've turned neovim into a CPU cycle-eating machine.

I don't want to keep hunting for high frequency timers in careless plugins. Something needs to be done, preferably at the nvim layer.

EDIT: Definitely didn't expect some people to be so defensive about this.

To clarify: timers aren't a problem in an application that already uses up your CPU a lot and needs to respond quickly. They are a problem in an application that sits in the background is supposed to let the CPU idle as much as possible. One can also run the timers when the app is active, and then disable them when it's idling. I have neovim running in tens of instances on my machines, and the impact is serious.

I'm attaching LLM answers as objective observers on the matter, since people want to dispute it:

https://chatgpt.com/share/6a4a2354-03e4-83ed-b745-2315e3b3e88f

https://share.gemini.google/vAll2XerOoso

https://claude.ai/share/95cec7cb-7078-4bd9-91c1-6f2f2009a325

EDIT2: I didn't mean this as an attack on anyone in particular (even if it was read as such), and I didn't do my homework enough to know 3 of the mentioned plugins are made by one guy, making it look like an attack. Seriously, this wasn't meant as a shaming or anything like that, no matter what intent you read into it. It's totally ok for any programmer to make this mistake - especially one as prolific as folke, and I appreciate his work greatly -- that's why I use it as my daily driver. My comment was meant at the problem where there is a lack of awareness in general about the problem of using high frequency timers, and there's no easy mechanism to trace them from the neovim side.

u/BluddyCurry — 1 day ago
▲ 11 r/LazyVim+1 crossposts

matugen.nvim - Material You color palette integration for Neovim

Hi everyone,

I just put together **matugen.nvim**, a plugin designed to bring dynamic Material You color palettes straight into Neovim via Matugen

If you're ricing your Linux setup with wallpaper-based color generation (like Hyprland, Waybar, etc.) and want your editor to match without clunky hacks or hardcoded scripts, this bridges that gap

Key Details:

  • Integrates Matugen palettes directly into your Neovim environment.

  • Lightweight and written entirely in Lua.

  • Designed to fit seamlessly with broader system-wide dynamic ricing.

Check out the repo here: https://github.com/Senal-D-A-Gunaratna/matugen.nvim

Let me know if you have any feedback or features you want to see added!

u/nerdy_cat_guy — 1 day ago

How come spelling suggestions are hidden behind z?

Hey guys,

I found spelling suggestions are behind the `z` (fold) menu (`z=`). It looks a little out of place. Does anyone know why it's in there by default? I was thinking even `leader-c` might make more sense (code action).

I don't use it much but wonder whether anyone feels the same.

reddit.com
u/picklerick63 — 6 days ago