Closed wonderbeel closed 2 months ago
I'm having trouble reproing this issue. How are you disabling TS? TSBufDisable
?
I am disabling it directly in the configuration like this (basically what treesitter suggests in their docs https://github.com/nvim-treesitter/nvim-treesitter/blob/master/doc/nvim-treesitter.txt#L117 )
highlight = {
enable = true,
disable = function(_, buf)
local max_filesize = 100 * 1024 -- 100 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
}
Now that I reread the issue again it was slightly misleading, what I am actually doing is disabling the highlight
module and fallback to the regex, not disabling the entire treesitter, sorry my bad.
Not sure if this is related, but also getting an error from the command window (q:
), when editing text and completion is about to appear
Error detected while processing TextChangedI Autocommands for "*":
Error executing lua callback: Vim:E474: String "<89>
stack traceback:
[C]: in function 'json_encode'
...g/.local/share/nvim/lazy/codeium.nvim/lua/codeium/io.lua:407: in function 'post'
.../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:146: in function 'request'
.../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:287: in function 'request_completion'
...ocal/share/nvim/lazy/codeium.nvim/lua/codeium/source.lua:103: in function 'complete'
...jemag/.local/share/nvim/lazy/nvim-cmp/lua/cmp/source.lua:325: in function 'complete'
...e/jemag/.local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:289: in function 'complete'
...e/jemag/.local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:169: in function 'callback'
...e/jemag/.local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:219: in function 'autoindent'
...e/jemag/.local/share/nvim/lazy/nvim-cmp/lua/cmp/core.lua:161: in function 'on_change'
...e/jemag/.local/share/nvim/lazy/nvim-cmp/lua/cmp/init.lua:313: in function 'callback'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/autocmd.lua:49: in function 'emit'
...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/autocmd.lua:23: in function <...local/share/nvim/lazy/nvim-cmp/lua/cmp/utils/autocmd.lua:22>
Edit: Not related to this, created separate issue
I got the same error, but in my case the problem was not in the treesitter highlight, but in the big files themselves.
I was having this problem on a file with around 3500 lines and when I deleted around 1000 lines the problem was gone. On the other hand, I took a plain text file and copy/pasted until I got to about 5000 lines and the problem started.
I was also able to reproduce this in .zshrc and Lua files.
Edit: the problem is E2BIG: argument list too long
Hi, I am playing around with this plugin and found an issue: I have treesitter configured to disable text highlight in big files (in those cases it is too slow and makes the editor hang for a couple of seconds after each key stroke, falling back to the regex parser solves this issue) and it seems that doing this makes your plugin break with the following error
(api key and text have been cropped out just to be safe)
If I enable treesitter highlight again the error disappear but then the editor became unusable, it would be great to fix this issue.
Let me know if you need something else to help debug this issue :).