Files
nvim-config/lua/plugins/performance.lua

16 lines
374 B
Lua

return {
{
"nvim-treesitter/nvim-treesitter",
opts = {
highlight = {
enable = true,
disable = function(_, buf)
local max_filesize = 200 * 1024 -- 200 KB
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
return ok and stats and stats.size > max_filesize
end,
},
},
}
}