From: "João Távora" <joaotavora@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 58790@debbugs.gnu.org, Stefan Kangas <stefankangas@gmail.com>,
Danny Freeman <danny@dfreeman.email>
Subject: bug#58790: Eglot URI parsing bug when using clojure-lsp server
Date: Sat, 29 Oct 2022 03:02:56 +0100 [thread overview]
Message-ID: <87r0yrwfn3.fsf@gmail.com> (raw)
In-Reply-To: <f39bd6fa-903d-1723-8ec2-d7ffff4d4a9c@yandex.ru> (Dmitry Gutov's message of "Sat, 29 Oct 2022 04:22:43 +0300")
Dmitry Gutov <dgutov@yandex.ru> writes:
> We don't provide a setter for 'project-root', so I don't understand
> the expectation of being able to modify project-external-roots for an
> arbitrary project type either.
I think I understand your confusion. I'm not suggesting that Eglot
modifies it. I'll explain better below.
>>> Dmitry: Or create an Eglot-specific project backend.
>> I don't understand this suggestion either. Normally Eglot is a
>> client
>> of project information maintained by other project.el backends. Very
>> commonly VC projects, but not always necessarily so. That clashes with
>> the idea of making Eglot simultaneously a supplier of this information.
>
> There is indeed certain tension, but if Eglot wants to decide stuff
> about the project (which, as I said in the past, could be a reasonable
> idea), then it could provide its own project backend. We're not
> necessarily at that point, though, because...
Eglot doesn't want to decide anything about project. Eglot justs wants
to go into user visible projects and answer the question:
(project-current). It wants this because it maps project/major-mode
pairs to server connections.
Eglot doesn't care if the project is of type 'vc, 'transient,
'visual-studio-solution-file, 'joes-complicated-project, etc.
So Eglot providing a project backend doesn't make sense. Maybe you
think I'm suggesting that Eglot that could collect these references to
jars coming from the LSP server and add them to project-external-roots
somehow. I'm not suggesting that.
It's just that an arbitrary project backend, other than 'vc or
'transient, could add a method to project-external-roots. That would be
the user's job. I suppose Clojure packages declare somewhere which jars
they use. They probably store this information in a file. Java used
some ghastly .xml Ant file or Maven or whatever. A specialized project
backend could read the file and use it in an implementation of
project-external-roots. At this this is how I interpret project.el's
CLOS-like protocol for defining new project backends.
>> Please read the summary of the outlined above. Maybe there's nothing to
>> be done in project.el if eglot-extend-to-xref is to be used.
>
> ...indeed you could stop at that.
Maybe. eglot-extend-to-xref works very well for non-jars, at least for
C++ and clangd. Subsequent M-. work very well, too.
The downside is that once a system file discovered by the LSP server, it
is associated with a given server (_not project_) in Eglot. I don't
know what happens if another server also points to the same file.
Probably nothing very bad, but there may be some suprising behavior: I
haven't tested.
> Having the jars in project-external-roots could enable the users
> (after certain integration work) to search across their contents with
> project-or-external-find-regexp, or jump to files inside with
> project-or-external-find-file.
That's a very nice point. I don't use Java fortunately, but when I did
a long time ago, I think I remember Eclipse let me do this.
> But as for xref-find-definitions, item 4 in your list should be enough
> (with either of the alternatives as underlying implementation).
Let's see what Danny says.
João
next prev parent reply other threads:[~2022-10-29 2:02 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-25 21:44 bug#58790: Eglot URI parsing bug when using clojure-lsp server Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-26 6:22 ` Stefan Kangas
2022-10-26 19:50 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-27 15:09 ` João Távora
2022-10-29 1:22 ` Dmitry Gutov
2022-10-29 2:02 ` João Távora [this message]
2022-10-29 14:54 ` Dmitry Gutov
2022-10-29 19:35 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-10-31 14:40 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-02 8:09 ` João Távora
2022-11-02 13:15 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-03 17:10 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 9:49 ` Eli Zaretskii
2022-11-10 11:00 ` João Távora
2022-11-10 13:47 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 15:38 ` Eli Zaretskii
2022-11-10 21:45 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 21:59 ` João Távora
2022-11-10 22:22 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 22:30 ` João Távora
2022-11-10 22:48 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-10 22:48 ` João Távora
2022-11-10 22:57 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-11 7:29 ` Eli Zaretskii
2022-11-12 17:03 ` Michael Albinus
2022-11-13 21:04 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-15 19:04 ` Michael Albinus
2022-11-15 22:28 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-16 7:53 ` Michael Albinus
2022-11-16 10:21 ` João Távora
2022-11-16 15:45 ` Michael Albinus
2022-11-16 16:20 ` João Távora
2022-11-16 22:59 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-02 16:14 ` Michael Albinus
2022-12-07 18:56 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-08 13:46 ` Michael Albinus
2022-12-08 19:07 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-09 16:04 ` Michael Albinus
2022-12-10 17:21 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-10 17:45 ` Michael Albinus
2022-11-22 14:30 ` Michael Albinus
2022-11-23 11:55 ` Richard Copley
2022-11-23 12:36 ` João Távora
2022-11-23 12:42 ` Arash Esbati
2022-11-23 12:49 ` Richard Copley
2022-11-23 12:54 ` João Távora
2022-11-23 13:33 ` Eli Zaretskii
2022-11-23 13:44 ` João Távora
2022-11-23 14:03 ` Danny Freeman via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-11-23 19:53 ` João Távora
2022-11-11 8:30 ` Eli Zaretskii
2022-11-11 9:45 ` João Távora
2022-11-11 12:01 ` Eli Zaretskii
2022-11-11 14:02 ` João Távora
2022-11-11 14:45 ` Eli Zaretskii
2022-11-12 9:04 ` João Távora
2022-11-11 7:16 ` Eli Zaretskii
2022-11-01 17:25 ` Juri Linkov
2022-10-29 15:36 ` Felician Nemeth
2022-10-29 17:09 ` João Távora
2022-11-09 0:59 ` bug#58790: Robert Brown
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=87r0yrwfn3.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=58790@debbugs.gnu.org \
--cc=danny@dfreeman.email \
--cc=dgutov@yandex.ru \
--cc=stefankangas@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.