-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
E523 when using clever-f #68
Comments
@rockyzhang24 it looks like your figet.nvim is outdated, because L216 does not read like |
Thanks. |
Sorry, I misread the stacktrace. You are right -- I can also reproduce the bug. Indeed
The problem is that the "deferred" |
@wookayin Thank you so much. I am not sure whether or not this issue is caused by |
Also worth checking out a comment by @kevinhwang91 (https://www.reddit.com/r/neovim/comments/tzz5v7/share_a_ff_highlight_plugin/i42cy0d/) -- You might want to switch to another similar plugin as a workaround. I use a similar plugin that maps It's a bug that clever-f needs to fix, or neovim might be responsible for scheduling as |
Okay. Thank you for your suggestions. |
So the problem is while UI is blocking during the execution of We will need to find a way to tell whether neovim is currently waiting for some input or blocking, or it is safe to do some buffer manipulation (E523 error). |
@wookayin Thank you so much for your investigation. Both fidget and clever-f are my must-have. Hope this can be fixed soon. Thanks again. |
fidget.nvim will raise errors when some plugins like clever-f are used: when the 'emulated' operator is pending, a 'textlock' is held but the event loop will still be running and trying to draw figdets. There seems no a good way to tell whether it is safe to draw fidgets (despite the vim.schedule deferral); surprisingly, an easy workaround is to simply ignore the E523 error. Fixes j-hui#68
@rockyzhang24 Try out PR #69. |
fidget.nvim will raise errors when some plugins like clever-f are used: when the 'emulated' operator is pending, a 'textlock' is held but the event loop will still be running and trying to draw figdets. There seems no a good way to tell whether it is safe to draw fidgets (despite the vim.schedule deferral); surprisingly, an easy workaround is to simply ignore the E523 error. Fixes j-hui#68
@wookayin Thank you. I already tried and no errors any more. Just a quick question, does ignoring this E523 error have any side effects? Fidget will work as normal, right? |
Yes, it is perfectly fine. Because E523 errors happens due to a 'textlock' (see |
@wookayin Okay, thank you for explaining it in detail. I just tested it, and I found another glitch. To reproduce it:
Thank you! |
@rockyzhang24 Good catch. Can you try again in the updated PR? |
Because I don't think it's appropriate for fidget to fix this bug. There're maybe a lot of other async functions to encounter this issue. From the upstream is too hard to fix. From the clever-f avoid using |
@kevinhwang91 Thanks for the additional input. Yes, I think neovim should provide some API to tell whether a 'lock' is held, and this is just a workaround. But this error happens quite aggressively with clever-f as well as other similar plugins (e.g., yours and quickscope) which we don't have much control over. |
@wookayin Tried but still see the issue: ghost chars and errors. Thank you. |
I'm not sure whether |
Again, the problem is that a function deferred by I think this requires an upstream fix, so no good solution for now. For the time being, I think #69 can be still merged to avoid most of E523 errors, and we can later improve the remaining case of the E523 error when fidget is trying to close. @j-hui Any thoughts? |
fidget.nvim will raise errors when some plugins like clever-f are used: when the 'emulated' operator is pending, a 'textlock' is held but the event loop will still be running and trying to draw figdets. There seems no a good way to tell whether it is safe to draw fidgets (despite the vim.schedule deferral); surprisingly, an easy workaround is to simply ignore the E523 error. When it comes to killing and closing a fidget, we can also ignore the E523 error but make sure deallocating fidget instances happens after getting rid of the buffer and the window.
@rockyzhang24 I rewrote the logic (#69, ef09f43) and we can ignore the error when fidgets would be closed as well. This will make the annoying error not happen any more. However it cannot 100% eliminate "ghost chars" as I explained earlier; but we have some workaround like |
@wookayin Great. Thank you so much for digging deeper into this issue and trying to come up with solutions. It looks like we have to wait for the upstream fix to make this issue solved completely. Could you please open an issue upstream? If I do, I'm afraid I cannot describe it clearly. |
fidget.nvim will raise errors when some plugins like clever-f are used: when the 'emulated' operator is pending, a 'textlock' is held but the event loop will still be running and trying to draw figdets. There seems no a good way to tell whether it is safe to draw fidgets (despite the vim.schedule deferral); surprisingly, an easy workaround is to simply ignore the E523 error. When it comes to killing and closing a fidget, we can also ignore the E523 error but make sure deallocating fidget instances happens after getting rid of the buffer and the window.
Hello,
I am using clever-f and I got this issue
It happens during the initialization of LSP server and the issue is gone after that. To reproduce, open any
lua
file (lua
server needs longer time to initialize, so it's easier to reproduce), then before the server initialization finish, pressf
plus some char, then errors pop up.Thank you very much.
The text was updated successfully, but these errors were encountered: