Zulip Chat Archive
Stream: general
Topic: Why is neovim infoview faster than of emacs and code?
Abdullah Uyu (Apr 08 2024 at 18:56):
By faster, I measure the response time with my eye, and neovim seems to update the infoview faster than emacs and code. Here is a recording that demonstrates the phenomenon:
2024-04-08-21-35-28.mkv
Richard Copley (Apr 08 2024 at 19:32):
In Emacs, most of the delay is just lsp-mode
waiting in case there are more keystrokes, before sending a refresh request. This is lsp-idle-delay
(default 0.5 (seconds)) and you can customize it.
Kevin Buzzard (Apr 08 2024 at 19:36):
Is there an analogous delay in VS Code?
Abdullah Uyu (Apr 08 2024 at 19:36):
Oh yes, now emacs and code seem equal for me.
Richard Copley (Apr 08 2024 at 20:10):
Kevin Buzzard said:
Is there an analogous delay in VS Code?
(I can't answer that.)
Joachim Breitner (Apr 08 2024 at 21:21):
Ok, indeed, that seems a significant difference. Maybe I should look into using neovim for lean development :-)
Marc Huisinga (Apr 08 2024 at 21:46):
Kevin Buzzard said:
Is there an analogous delay in VS Code?
There's an elaboration delay setting that you can configure (its default is at 200ms, I believe the NeoVim plugin just sets it to 0ms by default).
Marc Huisinga (Apr 08 2024 at 22:12):
It shouldn't affect just moving the cursor, though
Marc Huisinga (May 23 2024 at 11:23):
I didn't know about this myself, but it turns out that the VS Code InfoView has an additional 'Infoview: Debounce Time' setting that is at 50ms by default to prevent the InfoView from re-rendering when quickly moving the text cursor a lot. If you want the InfoView to update more quickly when the text cursor is moved, you can reduce the debounce time further.
Julian Berman (May 23 2024 at 11:40):
We set the debounce time to 0 by default.
Julian Berman (May 23 2024 at 11:40):
Really that was originally to avoid whatever race condition in the server causes neovim to hang.
Julian Berman (May 23 2024 at 11:40):
But it does certainly make things feel snappier too.
Julian Berman (May 23 2024 at 11:41):
Oh you said that already previously.
Marc Huisinga (May 23 2024 at 11:49):
It's also worth pointing out that the elaboration delay setting is dead code now. The post-incrementality language server uses the server.reportDelayMs
command line option to reduce flickering and the edit delay setting is not used at all anymore.
Last updated: May 02 2025 at 03:31 UTC