diffview.nvim icon indicating copy to clipboard operation
diffview.nvim copied to clipboard

Show warning if diff is big

Open TheodorRene opened this issue 3 years ago • 4 comments

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.

TheodorRene avatar Jan 09 '23 09:01 TheodorRene

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 :)

sindrets avatar Jan 09 '23 12:01 sindrets

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.

TheodorRene avatar Jan 17 '23 13:01 TheodorRene

@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.

sindrets avatar Jan 17 '23 15:01 sindrets

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.

TheodorRene avatar Jan 17 '23 15:01 TheodorRene