[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot d5859b5 03/54: Per #319: fix race condition when
From: |
João Távora |
Subject: |
[elpa] externals/eglot d5859b5 03/54: Per #319: fix race condition when company-completing quickly |
Date: |
Thu, 16 Apr 2020 05:31:44 -0400 (EDT) |
branch: externals/eglot
commit d5859b53bdef12f2c7cb8cb51b5e2223e609769f
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Per #319: fix race condition when company-completing quickly
For some reason, probably related to the way that Eglot tries to
maintain the responsiveness of Company completion tooltips (see
below), the user's explicit input will sometimes be surprisingly
deleted by Company, leading to a horrible completion experience.
This is sometimes hard to reproduce, but appears to match this
description perfectly:
https://github.com/joaotavora/eglot/issues/319#issuecomment-542955432
Fortunately, Company has a good fix for this, which is to pass
`:company-require-match 'never` in the completion-at-point function.
This is the fix applied in this commit.
However, this line shouldn't be required since the default value for
`company-require-match` is `company-explicit-action-p`, presumably
meaning that the auto-deletion should never take place for characters
typed by the user.
This points to a bug in Company, or at least something which may have
been exacerbated by the way that Eglot aggressively fetches
completions from the server by passing :cancel-on-input to
`jsonrpc-request`, discarding out-of-date replies. Perhaps that
discarding step bears with it some side-effects that make the
`company-explicit-action-p` test return `nil` instead of the correct
`t`. Company interprets this as carte blanche to delete the last
inserted character.
* eglot.el (eglot-completion-at-point): Use :company-require-match
'never.
---
eglot.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/eglot.el b/eglot.el
index bd5f1ac..92a35ca 100644
--- a/eglot.el
+++ b/eglot.el
@@ -2005,6 +2005,7 @@ is not active."
(erase-buffer)
(insert formatted)
(current-buffer)))))
+ :company-require-match 'never
:company-prefix-length
(save-excursion
(when (car bounds) (goto-char (car bounds)))
- [elpa] externals/eglot updated (33a4f86 -> e02479a), João Távora, 2020/04/16
- [elpa] externals/eglot 6dd5de9 05/54: Unbreak imenu, João Távora, 2020/04/16
- [elpa] externals/eglot 243788d 04/54: Force Company to align completion annotations in Eglot sessions, João Távora, 2020/04/16
- [elpa] externals/eglot d5859b5 03/54: Per #319: fix race condition when company-completing quickly,
João Távora <=
- [elpa] externals/eglot 576ea2e 02/54: Unbreak M-x vc-revert, which reverts preserving modes, João Távora, 2020/04/16
- [elpa] externals/eglot 32ba9d0 06/54: Expand README.md section on handling quirky servers, João Távora, 2020/04/16
- [elpa] externals/eglot 3d480d1 01/54: Fix #259 (again): fix issue with replace-buffer-contents, João Távora, 2020/04/16
- [elpa] externals/eglot 83b2acb 09/54: Support markdown for textDocument/hover (#329), João Távora, 2020/04/16
- [elpa] externals/eglot de7631d 17/54: Fix #345: set nobreak-char-display to nil in *eglot-help*, João Távora, 2020/04/16
- [elpa] externals/eglot 179a56d 13/54: Only set eglot--cached-current-server by (more aggressive) caching, João Távora, 2020/04/16
- [elpa] externals/eglot 146108a 15/54: Fix #342: Provide stable eglot-current-server helper, João Távora, 2020/04/16
- [elpa] externals/eglot 8c9078e 19/54: Fix #343: Let other imenu functions work if LSP server's doesn't, João Távora, 2020/04/16
- [elpa] externals/eglot 4bd8773 23/54: Fix #339: fail when eglot-find-* finds no references, João Távora, 2020/04/16
- [elpa] externals/eglot 76d8f49 10/54: Per #50: use completionItem/resolve more abundantly, João Távora, 2020/04/16