Allow parsing of bigger files

This commit is contained in:
Julien LE PAGE 2023-07-17 10:19:36 +02:00
parent f241fba3d0
commit adfbfcd0bc

View File

@ -296,7 +296,7 @@ local function manage_plugins()
disable = {}, disable = {},
-- disable slow treesitter highlight for large files -- disable slow treesitter highlight for large files
disable = function(lang, buf) disable = function(lang, buf)
local max_filesize = 100 * 1024 -- 100 KB local max_filesize = 200 * 1024 -- 200 KB
local ok, stats = local ok, stats =
pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then if ok and stats and stats.size > max_filesize then