From: Brian Leung Date: Mon, 17 Jul 2023 13:29:18 +0000 (+0100) Subject: Eglot: check correct capability name in eglot-imenu (bug#64682) X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7446a8c34e2b793df52dbf56b630e20f8c10568c;p=emacs.git 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. --- diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el index 8ac21638a5b..1df3a8844f8 100644 --- a/lisp/progmodes/eglot.el +++ b/lisp/progmodes/eglot.el @@ -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