[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/eglot 40f151b 51/62: Close #80: Consider :triggerCharac
From: |
Stefan Monnier |
Subject: |
[elpa] externals/eglot 40f151b 51/62: Close #80: Consider :triggerCharacters in company completion |
Date: |
Sat, 29 Sep 2018 17:13:36 -0400 (EDT) |
branch: externals/eglot
commit 40f151b962c9e56c48848261cb9cb60f512cef9c
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>
Close #80: Consider :triggerCharacters in company completion
* eglot.el (eglot-completion-at-point): Take advantage of
:company-prefix-length.
---
eglot.el | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/eglot.el b/eglot.el
index 3bd342d..4f72644 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1384,8 +1384,9 @@ is not active."
(defun eglot-completion-at-point ()
"EGLOT's `completion-at-point' function."
(let ((bounds (bounds-of-thing-at-point 'symbol))
- (server (eglot--current-server-or-lose)))
- (when (eglot--server-capable :completionProvider)
+ (server (eglot--current-server-or-lose))
+ (completion-capability (eglot--server-capable :completionProvider)))
+ (when completion-capability
(list
(or (car bounds) (point))
(or (cdr bounds) (point))
@@ -1451,6 +1452,10 @@ is not active."
(erase-buffer)
(insert (eglot--format-markup documentation))
(current-buffer)))))
+ :company-prefix-length
+ (cl-some #'looking-back
+ (mapcar #'regexp-quote
+ (plist-get completion-capability :triggerCharacters)))
:exit-function (lambda (obj _status)
(cl-destructuring-bind (&key insertTextFormat
insertText
- [elpa] externals/eglot e05360a 50/62: Actually add snippet example gif referenced in README.md, (continued)
- [elpa] externals/eglot e05360a 50/62: Actually add snippet example gif referenced in README.md, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot c8cccee 52/62: Ignore extra keys in textDocument/publishDiagnostics (#81), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 6f1d64c 59/62: Close #100: Don't send other notifications before initialized, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot f482c3e 60/62: Close #115: Don't block kill-buffer-hook if server somehow hangs, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 821b498 62/62: Correctly map DocumentSymbol's :kind to its name (#121), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot bd6304d 57/62: Fix serious breakage introduced by #93, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 8e1a91b 31/62: Add a generic eglot-execute-command API, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot d5167ea 29/62: Minor fixes to test infrastructure, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot b0b16e2 37/62: Allow tests to be run with custom jsonrpc.el, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 8e0cf60 45/62: Fix textDocument/hover responses where MarkedString is a plist (#72), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 40f151b 51/62: Close #80: Consider :triggerCharacters in company completion,
Stefan Monnier <=
- [elpa] externals/eglot e5b89af 53/62: Close #82: Correctly delete text before expanding snippet completions, Stefan Monnier, 2018/09/29
- [elpa] externals/eglot f9beb19 55/62: When exiting emacs, don't ask the user to confirm killing processes (#83), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot badcaec 56/62: Don't warn on implementation-specific notifications (#93), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot 042a236 49/62: * README.md (Obligatory animated gif section): Add snippet gif., Stefan Monnier, 2018/09/29
- [elpa] externals/eglot b061873 61/62: Autoload eglot-ensure (#120), Stefan Monnier, 2018/09/29
- [elpa] externals/eglot f3f8531 58/62: Close #94: Prefer ccls over cquery for C/C++, Stefan Monnier, 2018/09/29