Update bigfile.lua

This commit is contained in:
Rubin Bhandari 2024-05-31 22:06:52 +05:45 committed by GitHub
parent 97b22ac13c
commit ba0e1d916c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,19 +1,7 @@
return {
"LunarVim/bigfile.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
pattern = function(bufnr, filesize_mib)
if filesize_mib >= 2 then
return true
end
-- you can't use `nvim_buf_line_count` because this runs on BufReadPre
local file_contents = vim.fn.readfile(vim.api.nvim_buf_get_name(bufnr))
local file_length = #file_contents
if file_length > 5000 then
return true
end
return false
end,
},
"LunarVim/bigfile.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {
filesize = 2, -- size of the file in MiB, the plugin round file sizes to the closest MiB
},
}