]> git.eshelyaron.com Git - emacs.git/commitdiff
Unbreak imenu for cquery servers (and probably more)
authorJoão Távora <joaotavora@gmail.com>
Mon, 25 Jun 2018 12:12:55 +0000 (13:12 +0100)
committerJoão Távora <joaotavora@gmail.com>
Mon, 25 Jun 2018 12:14:59 +0000 (13:14 +0100)
* eglot.el (eglot-imenu): Don't try to make a group for symbols
without kind.

GitHub-reference: close https://github.com/joaotavora/eglot/issues/31

lisp/progmodes/eglot.el

index f8574e9428e547ca0ef7783b96f66730447f38f1..88746a72823d1b9e9e4bfcd14c829d55b476fa07 100644 (file)
@@ -1349,8 +1349,10 @@ If SKIP-SIGNATURE, don't try to send textDocument/signatureHelp."
                                :textDocument/documentSymbol
                                `(:textDocument ,(eglot--TextDocumentIdentifier))))))
         (append
-         (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
-                       entries)
+         (cl-remove nil
+                    (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
+                                  entries)
+                    :key #'car)
          entries))
     (funcall oldfun)))