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.
GitHub-reference: fix https://github.com/joaotavora/eglot/issues/285
: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)