fix(nvim): do not check filesize in treesitter
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m24s

This commit is contained in:
Price Hiller 2024-05-22 14:26:07 -05:00
parent 5e06e3d187
commit 7f679cedfc
Signed by: Price
GPG Key ID: C3FADDE7A8534BEB

View File

@ -138,16 +138,10 @@ return {
}
for _, ft in ipairs(disabled_filetypes) do
if vim.bo.filetype == ft then
if vim.bo[buf] and vim.bo[buf].filetype == ft then
return true
end
end
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,
},
indent = {