emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/eglot 28d8ffe 48/69: Fix #285: unbreak Elm language ser


From: João Távora
Subject: [elpa] externals/eglot 28d8ffe 48/69: Fix #285: unbreak Elm language server which does use :triggerCharacters
Date: Sun, 20 Oct 2019 08:21:51 -0400 (EDT)

branch: externals/eglot
commit 28d8ffe8a8098e11e6e39d8150ab7766ebcd5088
Author: João Távora <address@hidden>
Commit: João Távora <address@hidden>

    Fix #285: unbreak Elm language server which does use :triggerCharacters
    
    Only query completionProvider -> triggerCharacter information if the
    server has provided it.  Elm's, and probaly other's, do not provide
    it, which doesn't mean they don't support completion.
    
    * eglot.el (eglot-completion-at-point): Check that completion
    capability is a list before treating it like one.
---
 eglot.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/eglot.el b/eglot.el
index d1a1a3d..cfcfaa7 100644
--- a/eglot.el
+++ b/eglot.el
@@ -1958,10 +1958,11 @@ is not active."
        :company-prefix-length
        (save-excursion
          (when (car bounds) (goto-char (car bounds)))
-         (looking-back
-          (regexp-opt
-           (cl-coerce (cl-getf completion-capability :triggerCharacters) 
'list))
-          (line-beginning-position)))
+         (when (listp completion-capability)
+           (looking-back
+            (regexp-opt
+             (cl-coerce (cl-getf completion-capability :triggerCharacters) 
'list))
+            (line-beginning-position))))
        :exit-function
        (lambda (comp _status)
          (let ((comp (if (get-text-property 0 'eglot--lsp-completion comp)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]