bigfile
This commit is contained in:
@ -23,7 +23,7 @@ function M.map(mode, lhs, rhs, opts)
|
||||
end
|
||||
|
||||
function M.file_too_large(filename)
|
||||
local max_filesize = 100 * 1024 -- 100 KB
|
||||
local max_filesize = 2000 * 1024 -- 2MB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, filename)
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
@ -31,10 +31,6 @@ function M.file_too_large(filename)
|
||||
return false
|
||||
end
|
||||
|
||||
function M.buf_too_large()
|
||||
return M.file_too_large(vim.api.nvim_buf_get_name(vim.api.nvim_get_current_buf()))
|
||||
end
|
||||
|
||||
function M.use_google()
|
||||
if M.use_google_cache == nil then
|
||||
M.use_google_cache = M.file_exists(os.getenv("HOME") .. "/use_google")
|
||||
|
Reference in New Issue
Block a user