pteroctopus / faster.nvim

Some Neovim plugins and features can make Neovim slow when editing big files and executing macros. Faster.nvim will selectively disable some features when big file is opened or macro is executed.
66 stars 0 forks source link

Not all features are disabled #4

Open nopears opened 1 day ago

nopears commented 1 day ago

When I'm opening a 20mb json file it still has syntax highlighting, even tho it shouldn't afaik. Here's my config: CodeSnap_2024-12-01_at_12:32:54 And here's the result of opening the file:

Screenshot 2024-12-01 at 12 34 41 PM
nopears commented 1 day ago

Lmk if I'm doing something wrong, please. It still works kinda sluggish :(

pteroctopus commented 1 day ago

Hi,

In your dotfiles I see that you are using folke/snacks plugin that generates the notification I see on the second screenshot.

It seems snacks also has some bigfile detection (didn't look into it, I don't use it). Anyway if you disable bigfile detection in snacks than the pteroctopus/faster.nvim will work:

return {
  "folke/snacks.nvim",
***
    bigfile = { enabled = false },
***

Not sure why snacks breaks faster.nvim and what exactly snacks bigfile does. But if you don't need both than just disable snacks bigfile and faster.nvim should work.

I'll look into it if I have time at some point.

Please report back if this solves your problem and thank you for using faster.nvim

pteroctopus commented 1 day ago

From folke snacks bigfile Readme:

The default implementation enables syntax for the buffer and disables mini.animate (if used)

So snacks reenables syntax and thats why you have it.

nopears commented 13 hours ago

Thanks for helping, ig it's gonna work, will try soon

nopears commented 12 hours ago

That's my solution, cuz their implementation is worse than yours (much less optimization): image There's one thing tho, indent line still shows current scope, any ideas how to fix it would be great

pteroctopus commented 4 hours ago

Am I understanding correctly that you are using snacks bigfile but calling Faster command in its setup? If so please disable snacks bigfile as I sad in previous comment and then report back if you have problems when using only faster.nvim plugin.