Closed justchokingaround closed 6 months ago
treesitter plugins don't work great in big files apparently
TSDisable highlight
TSDisable illuminate
with this nvim is not freezing for me anymore
bigfile.nvim would be helpful for handling big files. though, it detects at smallest 1MiB files, the test file you gave was only 815KB lol
In #261 I've added an option to optionally disable Treesitter highlighting for file types or with functions, which you can use to disable highlighting on files larger than a certain size.
Seeing v0.6 is now merged main, I am closing this issue. For people potentially visiting in the future, I have left an example in the documentation for vim.treesitter.highlight.disable
. You may view it online or using the manpages.
⚠️ Please verify that this bug has NOT been reported before.
Description
This seems to only happen with obfuscated javascript files. Navigating through the log which I made to be 50K+ lines long worked just fine. (I didn't find anything useful in there btw, so I didn't post anything in the log section).
👟 Reproduction steps
Open a file thats over 20k lines long, for example the one from here: https://embed.smashystream.com/pl3.js?v=0.13
👀 Expected behavior
I should be able to format it and navigate through it quickly. (Even in VSCode I am able to do that, just fine).
😓 Actual Behavior
Neovim lags and then freezes entirely
💻 Metadata
"x86_64-linux"
- host os:Linux 6.6.23, NixOS, 24.05 (Uakari), 24.05.20240329.d8fe5e6
- multi-user?:yes
- sandbox:yes
- version:nix-env (Nix) 2.18.2
- nixpkgs:/etc/nix/inputs/nixpkgs
📝 Relevant log output