Closed tamago324 closed 2 years ago
Thanks for the review. Sorry. I didn't explain it well enough.
The intention of this PR was to control the highlighting by g:Illuminate_insert_mode_highlight. Therefore, I was happy to add only InsertEnter and CursorMovedI. However, in VimScript, WinLeave, BufLeave and InsertLeave also execute autocmd, so I added lua as well.
Also, I tried insertLeave without autocmd, and the highlighting was done when I exited Insert Mode, so I don't think insertLeave is necessary either.
If possible, I would like to remove autocmd for WinLeave, BufLeave and InsertLeave, how about that?
These autocmds open up potential for a lot of race conditions because vim.lsp.buf.document_highlight()
is an async function. I'll think about adding back g:Illuminate_insert_mode_highlight
but I'm going to close this PR for now. I'm planning on a partial rewrite of this plugin eventually where I can think about adding back that option.
Thank you for your explanation.
I understand. I'm really looking forward to the option of no highlighting in insert mode when this plugin is rewritten.
Thank you.
Thanks for creating and maintaining a great plugin!
Added autocmd as in VimScript.