diff --git a/.config/nvim/lua/core/autocommands.lua b/.config/nvim/lua/core/autocommands.lua index 86fe8ec..5da7b77 100644 --- a/.config/nvim/lua/core/autocommands.lua +++ b/.config/nvim/lua/core/autocommands.lua @@ -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, +})