APZelos / blamer.nvim

A git blame plugin for neovim inspired by VS Code's GitLens plugin
MIT License
733 stars 35 forks source link

Selecting multiple lines slows down pretty hard #32

Closed WhyNotHugo closed 3 years ago

WhyNotHugo commented 3 years ago

When entering visual mode, as I select more lines nvim slows down a lot. With 10-20 lines there's almost a second of lag, but with ~100 lines selected, nvim grinds to a halt taking several seconds to respond to any movement.

My impression is that the problem is because each line is fetched from git individually, and this just piles up hundreds of calls to git.

I'm no expert here, but I do think that some of these approaches might help:

sensorario commented 3 years ago

Same problem here!

WhyNotHugo commented 3 years ago

I turned blamer off for visual mode. I don't really need it in visual mode anyway, and it gets rid of the slowness:

-- In visual mode it's visually annoying AND slows down Vim A LOT.
vim.g.blamer_show_in_visual_modes = 0
jiyeol-lee commented 3 years ago

I think 'Auto-disable when selecting more than n lines (n can be either hardcoded or configurable?).' would be really helpful.

WhyNotHugo commented 3 years ago

That's pretty much what blamer_show_in_visual_modes does, but for n==1.