-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #285: unbreak Elm language server which does use :triggerCharacters
Only query :triggerCharacter information if the server has provided it. Elm's doesn't, apparently. * eglot.el (eglot-completion-at-point): Check that completion capability is a list before treating it like one.
- Loading branch information
1 parent
36b7cf3
commit 15b9762
Showing
1 changed file
with
5 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1952,10 +1952,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) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
joaotavora
via email
Author
Owner
|
||
(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) | ||
|
@joaotavora, are you sure this is necessary? With commit 6d87de1 completion-capability will be nil in the elm-case, I think.