feat(nvim): Disable treesitter on big files

This commit is contained in:
Tanguy Herbron 2024-01-12 20:47:25 +01:00
parent b33bc5a778
commit f523a536a7

View File

@ -8,6 +8,14 @@ return {
auto_install = true,
highlight = {
enable = true,
is_supported = function ()
if vim.fn.strwidth(vim.fn.getline('.')) > 300
or vim.fn.getfsize(vim.fn.expand('%')) > 1024 * 1024 then
return false
else
return true
end
end
},
enable = {
enable = true,