Closed lttb closed 3 months ago
Thank you for reporting this issue. I will investigate to see if I can reproduce the problem.
+1 I notice the same thing happening many times. Seems to be related to temporary buffers that close on file open, such as the immediate empty new buffer on entry and alpha.nvim type dashboard buffers, additionally the file explorer buffers.
Might be a simple life-time deal, the defer stores the buffer ID but if you close it faster than illuminate can defer, it errors out as a closed buffer. Might need to check if the buffer is still open in the clear_highlights callback.
Created a small change to defer_clear_highlights
function M.defer_clear_highlights(bufnr, namespace)
vim.defer_fn(function()
if not api.nvim_buf_is_valid(bufnr) then return end -- Check if buffer is still valid.
api.nvim_buf_clear_namespace(bufnr, namespace, 0, -1)
end, config_module.config.duration)
end
thanks for this plugin, looks really nice!
but I occasionally see this error:
it seems that it happens when I open the file with telescope.
video with an example of the issue:
https://github.com/mei28/luminate.nvim/assets/11135392/b8e51772-7514-4d93-a887-87b9480496cc
I'm happy to open a PR if I'll be able to resolve this issue.
thanks!