From b7840f91a513265adc123e47637da0907b9e12b8 Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Sun, 3 Nov 2024 09:13:17 +0100 Subject: [PATCH] feat(snacks): use bigfile --- lua/lazyvim/config/autocmds.lua | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/lua/lazyvim/config/autocmds.lua b/lua/lazyvim/config/autocmds.lua index e301bc1e..114003f8 100644 --- a/lua/lazyvim/config/autocmds.lua +++ b/lua/lazyvim/config/autocmds.lua @@ -124,29 +124,3 @@ vim.api.nvim_create_autocmd({ "BufWritePre" }, { vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p") end, }) - -vim.filetype.add({ - pattern = { - [".*"] = { - function(path, buf) - return vim.bo[buf] - and vim.bo[buf].filetype ~= "bigfile" - and path - and vim.fn.getfsize(path) > vim.g.bigfile_size - and "bigfile" - or nil - end, - }, - }, -}) - -vim.api.nvim_create_autocmd({ "FileType" }, { - group = augroup("bigfile"), - pattern = "bigfile", - callback = function(ev) - vim.b.minianimate_disable = true - vim.schedule(function() - vim.bo[ev.buf].syntax = vim.filetype.match({ buf = ev.buf }) or "" - end) - end, -})