helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
34.05k stars 2.52k forks source link

Configure inline diagnostics delay (preset 350ms) #11963

Open ok-nick opened 1 month ago

ok-nick commented 1 month ago

Hi, it would be nice if we could configure the inline diagnostics delay found here: https://github.com/helix-editor/helix/blob/101a74bf6edbbfdf9b0628a0bdbbc307ebe10ff2/helix-view/src/handlers/diagnostics.rs#L24

I'm currently using end of line diagnostics with inline diagnostics on the cursor line and it would be nice to display inline diagnostics instantly. I'm assuming the reason this delay was added was to address performance concerns when using the other-lines setting?

poliorcetics commented 3 weeks ago

IIRC it's also to avoid flickering when quickly scrolling through lines

llakala commented 3 weeks ago

I'd like this for a different reason: to put a longer delay. While typing a new line, I get constant errors even though I haven't finished typing yet. I'd want a delay of 2-3 seconds without keystrokes before the error actually popped up.