Skip to content
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

[HACK]: Make lsp-completion Super Fast for Large Candidate Sets! 🚀 #4737

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lsp-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -3431,11 +3431,11 @@ If NO-WAIT is non-nil send the request as notification."
:cancel-token :sync-request)
(while (not (or resp-error resp-result))
(if (functionp 'json-rpc-connection)
(catch 'lsp-done (sit-for 0.01))
(catch 'lsp-done (sit-for 0.001))
(catch 'lsp-done
(accept-process-output
nil
(if expected-time (- expected-time send-time) 1))))
0.001)))
(setq send-time (float-time))
(when (and expected-time (< expected-time send-time))
(error "Timeout while waiting for response. Method: %s" method)))
Expand Down Expand Up @@ -3470,7 +3470,7 @@ Return same value as `lsp--while-no-input' and respecting `non-essential'."
(while (not (or resp-error resp-result (input-pending-p)))
(catch 'lsp-done
(sit-for
(if expected-time (- expected-time send-time) 1)))
0.001))
(setq send-time (float-time))
(when (and expected-time (< expected-time send-time))
(error "Timeout while waiting for response. Method: %s" method)))
Expand Down