Disable bigfile for some filetypes #2057
-
Hey, How can I disable the bigfile feature but only for some filetypes pls? |
Beta Was this translation helpful? Give feedback.
Answered by
drowning-cat
Jul 16, 2025
Replies: 1 comment 1 reply
-
This may not be the most efficient approach, but it should work: opts = {
bigfile = {
-- size = 1, -- WARN: Use for testing
setup = function(ctx)
-- NOTE: Reassign buf's filetype
if vim.list_contains({ 'lua', 'javascript' }, ctx.ft) then
vim.bo[ctx.buf].ft = ctx.ft
return
end
-- See https://github.com/folke/snacks.nvim/blob/main/docs/bigfile.md#%EF%B8%8F-config
if vim.fn.exists ':NoMatchParen' ~= 0 then
vim.cmd [[NoMatchParen]]
end
Snacks.util.wo(0, { foldmethod = 'manual', statuscolumn = '', conceallevel = 0 })
vim.b.minianimate_disable = true
vim.schedule(function()
if vim.api.nvim_buf_is_valid(ctx.buf) then
vim.bo[ctx.buf].syntax = ctx.ft
end
end)
end,
},
}, |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
gmnz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This may not be the most efficient approach, but it should work: