From: "João Távora" <joaotavora@gmail.com>
To: "Gerd Möllmann" <gerd.moellmann@gmail.com>
Cc: 65517@debbugs.gnu.org
Subject: bug#65517: 30.0.50; Eglot: word list input
Date: Fri, 25 Aug 2023 10:05:00 +0100 [thread overview]
Message-ID: <87wmxjqypv.fsf@gmail.com> (raw)
In-Reply-To: <m27cpjsjz4.fsf@Mini.fritz.box> ("Gerd Möllmann"'s message of "Fri, 25 Aug 2023 08:40:31 +0200")
Gerd Möllmann <gerd.moellmann@gmail.com> writes:
> THe prompt of C-M-. advertises that the user can enter a list of words
> for search for, but that doesn't seem to be supported ATM.
C-M-. is bound to the command 'xref-find-apropos'. Eglot has installed
a backend for this command.
(cl-defmethod xref-backend-apropos ((_backend (eql eglot)) pattern)
If you look into the implementation you'll see it uses the LSP
'workspace/symbol' request. That interface is described in
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#workspace_symbol
The sparsely described 'query' field doesn't seem to explicitly support
'multiple word' searches of 'multiple word fragment' searches out of the
box. Furthermore each LSP server implementation can more or less
interpret this freely. Some LSP server implementation might even
support pattern-matching or even regexps there but it doesn't seem like
'clangd' (the server I presume you are using) does this.
You can see the communication in the Eglot events buffer. For example
here's me trying to query for "ma loc" and getting no replies:
[client-request] (id:32) Fri Aug 25 09:48:56 2023:
(:jsonrpc "2.0" :id 32 :method "workspace/symbol" :params
(:query "ma loc"))
[stderr] I[09:48:56.386] <-- workspace/symbol(32)
[server-reply] (id:32) Fri Aug 25 09:48:56 2023:
(:id 32 :jsonrpc "2.0" :result [])
If I query for 'malloc' instead, I get loads of hits.
João
next prev parent reply other threads:[~2023-08-25 9:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 6:40 bug#65517: 30.0.50; Eglot: word list input Gerd Möllmann
2023-08-25 9:05 ` João Távora [this message]
2023-08-26 4:55 ` Gerd Möllmann
2023-08-26 8:37 ` João Távora
2023-08-27 1:15 ` Dmitry Gutov
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wmxjqypv.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=65517@debbugs.gnu.org \
--cc=gerd.moellmann@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.