1
0
mirror of https://github.com/dcarrillo/dotfiles.git synced 2024-12-22 18:38:00 +00:00

[neovim] Disable illuminate on very large files

This commit is contained in:
Daniel Carrillo 2022-11-01 18:14:36 +01:00
parent 6066f801c6
commit 5a13d12e33
Signed by: dcarrillo
GPG Key ID: E4CD5C09DAED6E16

View File

@ -32,3 +32,13 @@ vim.api.nvim_create_autocmd({ "FileType" }, {
]])
end,
})
-- Disable illuminate on very large files
vim.api.nvim_create_autocmd({ "BufWinEnter" }, {
callback = function()
local line_count = vim.api.nvim_buf_line_count(0)
if line_count >= 5000 then
vim.cmd("IlluminatePauseBuf")
end
end,
})