Open chrisgrieser opened 1 year ago
Yes! I know that treesitter should allow to only update the code that is changed. This would reduce potential lag when editing a file. Are you experiencing lag when editing or just scrolling through the file?
If you want a temporary solution with max file size i'd be happy to look at a PR for this
oh sorry, I should have mentioned, the the lag already occurs when trying to open a big file, not only during editing
I am observing the same, in particular even character editing seem to be slow already for a file of around ~300 lines.
Wouldn't it be possible to only execute the parsing of the treesitter blocks for the portion of buffer on screen, or for the portion of code where the cursor is at? I remember that some other similar plugins suffer of the same problem, namely the treesitter parsing of the whole file after every action renders editing and scrolling very slow.
P. S. I never did any work myself with treesitter parsing, so please correct me in case some of what I said is nonsense :)
I noticed that in bigger files, there appears to be a considerable lag added when using this plugin. Especially with
automatic = true
, I think it might sense to have a setting for the maximum file size where this plugin is to be enabled (automatically)