performance stuff

This commit is contained in:
Christian Nieves
2024-05-29 18:39:20 +00:00
parent d3a6c45a98
commit 6e639bf24a
10 changed files with 146 additions and 194 deletions

View File

@ -49,14 +49,14 @@ return {
return true
end
local max_filesize = 200 * 1024 -- 200 KB
local max_filesize = 100 * 1024 -- 100 KB
local fname = vim.api.nvim_buf_get_name(buf)
local ok, stats = pcall(vim.loop.fs_stat, fname)
if ok and stats and stats.size > max_filesize then
vim.schedule(function()
vim.notify(
string.format(
"Disabling treesitter. File %s exceeds maximum configured size.",
"Disabling treesitter for buffer. File %s exceeds maximum configured size.",
fname
)
)