Some servers provide custom SymbolKinds. For example, ccls says that
symbols defined with #define are of kind 255.
* eglot.el (eglot-imenu): Don't delete elements with unknown symbol
kind from the return list, instead put them in `(Unknown)` group.
(mapcar
(jsonrpc-lambda
(&key name kind location _containerName _deprecated)
- (cons (propertize name :kind (cdr (assoc kind eglot--symbol-kind-names)))
+ (cons (propertize
+ name :kind (alist-get kind eglot--symbol-kind-names
+ "(Unknown)"))
(eglot--lsp-position-to-point
(plist-get (plist-get location :range) :start))))
(jsonrpc-request (eglot--current-server-or-lose)
:textDocument/documentSymbol
`(:textDocument ,(eglot--TextDocumentIdentifier))))))
- (cl-remove nil
- (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
- entries)
- :key #'car))
+ (seq-group-by (lambda (e) (get-text-property 0 :kind (car e)))
+ entries))
(funcall oldfun)))
(defun eglot--apply-text-edits (edits &optional version)