Fix so fzf lua (treesitter) doesn't hang the entire terminal window when previewing large minified files

This commit is contained in:
Martin Larsson 2025-01-09 17:11:36 +01:00
parent 0ef0551a30
commit dba9e41f57

View file

@ -13,6 +13,13 @@ return {
symbol_kinds = { "Variable", "Function", "Method", "Class", "Struct", "Interface" },
},
},
previewers = {
builtin = {
-- turn off syntax highlighting for files with more than 100KB
-- this avoid hanging when previewing large files (due to treesitter parsing on minified files)
syntax_limit_b = 1024 * 100, -- 100KB
}
}
},
config = function()
local fzf = require("fzf-lua")