sindrets / diffview.nvim

Single tabpage interface for easily cycling through diffs for all modified files for any git rev.
Other
3.85k stars 105 forks source link

Show warning if diff is big #283

Open TheodorRene opened 1 year ago

TheodorRene commented 1 year ago

My neovim freezes for a couple of seconds on quite big diffs. Is there a way to prompt if the diff is bigger than a set size? Either as a feature or if I can make my own locally.

sindrets commented 1 year ago

There's not such feature currently implemented, no. I'd be open to include it though, so if you are going to work on a solution for this, please consider opening a PR :)

TheodorRene commented 1 year ago

Seems like misinterpreted the symptom; the issue is not big diffs, but rather big files (16K lines). And thats seems to be an inherent issue of nvim. So it might not be relevant for this plugin.

sindrets commented 1 year ago

@TheodorRene Nvim has no issue opening big files. I can open a 100mb file instantly with:

nvim -u NORC --noplugin bigfile.txt

The culprit is almost certainly related to a plugin in your setup. Could be a slow LSP server, a slow treesitter parser, a slow ftplugin, or something else entirely.

TheodorRene commented 1 year ago

Ah, that makes sense. Seems like Treesitter is the culprit.. Diffview is just the only way I "accidentally" open these big files, so thats why I haven't noticed it before.