From 7446a8c34e2b793df52dbf56b630e20f8c10568c Mon Sep 17 00:00:00 2001 From: Brian Leung Date: Mon, 17 Jul 2023 14:29:18 +0100 Subject: [PATCH] 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. --- lisp/progmodes/eglot.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5