unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "João Távora" <joaotavora@gmail.com>
To: Wilhelm Kirschbaum <wkirschbaum@gmail.com>, 64274-done@debbugs.gnu.org
Subject: bug#64274: 30.0.50; Eglot requests textDocument/documentSymbol if its not declared in the server capabilities
Date: Sat, 1 Jul 2023 23:07:46 +0100	[thread overview]
Message-ID: <CALDnm51oZ4Y=T55fSsGBe_reYPSSy3f+gw9h_YBbmD8G55Owow@mail.gmail.com> (raw)
In-Reply-To: <87wmzsqwdh.fsf@gmail.com>

Pushed this patch to master and marking this done.

João

On Sun, Jun 25, 2023 at 12:22 AM Wilhelm Kirschbaum
<wkirschbaum@gmail.com> wrote:
>
>
>
> > OK, this makes sense.  Then please test this instead.
> >
> > João
> >
> > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el
> > index e2478f2dde3..c353ab6fce0 100644
> > --- a/lisp/progmodes/eglot.el
> > +++ b/lisp/progmodes/eglot.el
> > @@ -3348,9 +3348,11 @@ eglot--imenu-DocumentSymbol
> >                              (mapcar (lambda (c) (apply #'dfs
> >                              c)) children))))))
> >      (mapcar (lambda (s) (apply #'dfs s)) res)))
> >
> > -(defun eglot-imenu ()
> > +(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)
> > +    (cl-return-from eglot-imenu))
> >    (let* ((res (eglot--request (eglot--current-server-or-lose)
> >                                :textDocument/documentSymbol
> >                                `(:textDocument
>
> Yes, this works. Thank you. :)
>
> Wilhelm



-- 
João Távora





      reply	other threads:[~2023-07-01 22:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-24 19:40 bug#64274: 30.0.50; Eglot requests textDocument/documentSymbol if its not declared in the server capabilities Wilhelm Kirschbaum
2023-06-24 20:07 ` Wilhelm Kirschbaum
2023-06-24 21:56   ` João Távora
2023-06-24 22:35     ` Wilhelm Kirschbaum
2023-06-24 23:06       ` João Távora
2023-06-24 23:21         ` Wilhelm Kirschbaum
2023-07-01 22:07           ` João Távora [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALDnm51oZ4Y=T55fSsGBe_reYPSSy3f+gw9h_YBbmD8G55Owow@mail.gmail.com' \
    --to=joaotavora@gmail.com \
    --cc=64274-done@debbugs.gnu.org \
    --cc=wkirschbaum@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).