performance stuff
This commit is contained in:
@ -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
|
||||
)
|
||||
)
|
||||
|
Reference in New Issue
Block a user