Handle big files better
This commit is contained in:
parent
320d742b41
commit
55e28be32c
|
@ -9,6 +9,20 @@ return {
|
||||||
--- @module "snacks"
|
--- @module "snacks"
|
||||||
--- @type snacks.Config
|
--- @type snacks.Config
|
||||||
opts = {
|
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 = {
|
indent = {
|
||||||
enabled = true,
|
enabled = true,
|
||||||
indent = {
|
indent = {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user