This plugin is too slow in nvim
This plugin is too slow in nvim, I hope you can re-develop it with lua
@Hello-LuisWu Can you share some examples ? I use nvim myself and haven't really seen any sluggishness.
@Hello-LuisWu what's the reason it's slow in nvim instead of vim? Please keep the plugin compatible with both vim and nvim, it looks amazing :)
I'm experiencing major slowdowns myself for large tables (200 characters wide, 80 characters tall). I just started using the plugin though, so maybe I'm doing something wrong.
@bmvi-kinver Can you tell me what feels slow ? Is it formulas ? Is it navigation ? Is it the auto-alignment (most likely candidate) ?
@bmvi-kinver Also, could you disable the table syntax by setting let g:table_mode_syntax = 0 and see if that makes a difference.
@dhruvasagar it's slow in insert mode for the aforementioned table, just typing. I don't use formulas. Thanks for the suggestion! I set vim.g.table_mode_syntax = 0 in my init.lua file, and it's much faster now. Awesome plugin, by the way!
I'm experiencing slowdowns, too. I too am using neovim.
An example table that I'm working with has rougly 70 rows, 16 columns and is 317 characters wide. It contains some special characters (unicode squares https://www.compart.com/en/unicode/U+25A1).
Most navigation commands I am using here (h,j,k,l, <C-u>, <C-d>, <C-e>, and <C-y>) are very slow. The aforementioned commands, especially when pressed several times in a row or remaining pressed, cause lag and multisecond slowdowns in TableMode.
As a consequence I have to disable TableMode when navigating large tables. When I do the slowdowns disappear fully.
BTW: the vim.g.table_mode_syntax = 0 solution fully resolves the issue for me. I too love the plugin :slightly_smiling_face:
I have started work on a lua port, my experience so far with performance is that lua outperforms vimscript by quite a margin. This should help but is a fairly huge undertaking so it will take a bit to be usable. Will share updates here.
I noticed in Neovim 0.9.5 on Arch Linux that a table becomes slow to navigate (j, k, h, l) if there is some text highlighted after a search (/) and the table mode is active.
When I remove the highlight, or disable table mode, performance returns back to normal.
@mb720 Like pointed out above, the issue is with the table syntax. Disabling table syntax as stated above should fix the slowness.