fix(nvim): do not check filesize in treesitter
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m24s
All checks were successful
Check Formatting of Files / Check-Formatting (push) Successful in 1m24s
This commit is contained in:
parent
5e06e3d187
commit
7f679cedfc
@ -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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user