ray-x / lsp_signature.nvim

LSP signature hint as you type
Apache License 2.0
1.98k stars 53 forks source link

perf: reduce `cmp.visible()` timeout from 1000ms to 42ms #289

Closed llllvvuu closed 9 months ago

llllvvuu commented 9 months ago

fixes: #288

ray-x commented 9 months ago

1000ms is bad if LSP is slow. Is there a reason to choose 42ms

llllvvuu commented 9 months ago

Is there a reason to choose 42ms

I did some testing until I found that the typing felt snappy. e.g. 100ms was still a bit too noticeable.

FWIW what would happen in theory if we don't wait long enough, is that the panda text gets covered for a split second (until next keystroke) - which doesn't seem worth waiting a long time for. i.e. it seems better to just show the panda text immediately rather than blocking the editor (or the panda text can be shown async, but that's a larger effort)