Skip to content

Commit

Permalink
chore: update disable ts condition
Browse files Browse the repository at this point in the history
  • Loading branch information
BBboy01 committed Jun 8, 2024
1 parent 84fc2d7 commit 3d124a3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lua/plugins/coding.lua
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,15 @@ return {
highlight = {
enable = true,
disable = function(_, buf)
return vim.api.nvim_buf_line_count(buf) > 3000
if vim.api.nvim_buf_line_count(buf) > 3000 then
return true
end

local max_filesize = 1024 * 1024 -- 1MB
local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(buf))
if ok and stats and stats.size > max_filesize then
return true
end
end,
},
},
Expand Down

0 comments on commit 3d124a3

Please sign in to comment.