1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

Eglot: check correct capability name in eglot-imenu (bug#64682)

* lisp/progmodes/eglot.el (eglot-imenu): Declare the correct name of
the server capability providing textDocument/documentSymbol.

Without this change, eglot-imenu always aborts even when used with
servers supporting textDocument/documentSymbol.
This commit is contained in:
Brian Leung 2023-07-17 14:29:18 +01:00 committed by João Távora
parent ac566bcdee
commit 7446a8c34e

View file

@ -3367,7 +3367,7 @@ for which LSP on-type-formatting should be requested."
(cl-defun eglot-imenu ()
"Eglot's `imenu-create-index-function'.
Returns a list as described in docstring of `imenu--index-alist'."
(unless (eglot--server-capable :textDocument/documentSymbol)
(unless (eglot--server-capable :documentSymbolProvider)
(cl-return-from eglot-imenu))
(let* ((res (eglot--request (eglot--current-server-or-lose)
:textDocument/documentSymbol