emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 7446a8c34e2: Eglot: check correct capability name in eglot-imenu


From: João Távora
Subject: master 7446a8c34e2: Eglot: check correct capability name in eglot-imenu (bug#64682)
Date: Mon, 17 Jul 2023 09:37:50 -0400 (EDT)

branch: master
commit 7446a8c34e2b793df52dbf56b630e20f8c10568c
Author: Brian Leung <leungbk@posteo.net>
Commit: João Távora <joaotavora@gmail.com>

    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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]