feat(nvim): Disable treesitter on big files
This commit is contained in:
parent
b33bc5a778
commit
f523a536a7
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user