Handle big files better

This commit is contained in:
Dreaded_X 2025-06-01 21:09:00 +02:00
parent 320d742b41
commit 55e28be32c
Signed by: Dreaded_X
GPG Key ID: 5A0CBFE3C3377FAA

View File

@ -9,6 +9,20 @@ return {
--- @module "snacks"
--- @type snacks.Config
opts = {
bigfile = {
enabled = true,
---@param ctx {buf: number, ft:string}
setup = function(ctx)
-- Disable treesitter
vim.treesitter.stop(ctx.buf)
vim.schedule(function()
if vim.api.nvim_buf_is_valid(ctx.buf) then
vim.bo[ctx.buf].syntax = ctx.ft
end
end)
end,
},
indent = {
enabled = true,
indent = {