From: Niels Thykier <niels@thykier.net>
To: "João Távora" <joaotavora@gmail.com>, "Eli Zaretskii" <eliz@gnu.org>
Cc: 72088@debbugs.gnu.org
Subject: bug#72088: eglot: Segregates language servers in a way that hampers polyglot language servers
Date: Sun, 14 Jul 2024 11:46:52 +0200 [thread overview]
Message-ID: <cf3230b5-f9e0-4c66-9474-b65e388ae49b@thykier.net> (raw)
In-Reply-To: <e414cbdd-b9bc-43c6-aa10-42f15118faac@thykier.net>
Niels Thykier:
> João Távora:
>> On Sun, Jul 14, 2024, 05:37 Eli Zaretskii <eliz@gnu.org> wrote:
>>
>>> AFAIU, the OP tried to use the same LSP server for several languages,
>>> or something like that.
>>>
>>
>> Yes, but how? What are the major modes in question? What information was
>> added to eglot-server-programs, if any?
> Hi,
>
> The `eglot-server-programs` are defined as:
>
> ```
> (with-eval-after-load 'eglot
> (add-to-list 'eglot-server-programs
> '(debian-control-mode . ("debputy" "lsp" "server")))
> (add-to-list 'eglot-server-programs
> '(debian-changelog-mode . ("debputy" "lsp" "server")))
> (add-to-list 'eglot-server-programs
> '(debian-copyright-mode . ("debputy" "lsp" "server")))
> (add-to-list 'eglot-server-programs
> '(makefile-gmake-mode . ("debputy" "lsp" "server")))
> (add-to-list 'eglot-server-programs
> '(yaml-mode . ("debputy" "lsp" "server")))
> (add-to-list 'eglot-server-programs
> '(debian-autopkgtest-control-mode . ("debputy" "lsp"
> "server")))
> )
> ```
>
> [...]
>
> I read through
> https://www.gnu.org/software/emacs/manual/html_node/eglot/Setting-Up-LSP-Servers.html and I do not see anything here that decides how to control whether one or two instances per project will be spawned.
>
> Best regards,
> Niels
>
No, I think I see it now.
I think I have overlooked this paragraph:
"""
The major-mode of the alist elements can be either a symbol of an Emacs
major mode or a list of the form (mode :language-id id), with mode being
a major-mode symbol and id a string that identifies the language to the
server (if Eglot cannot by itself convert the major-mode to the language
identifier string required by the server). In addition, major-mode can
be a list of several major modes specified in one of the above forms –
this means a running instance of the associated server is responsible
for files of multiple major modes or languages in the project.
"""
I will retry with this in mind and see if that solves the problem. If it
does, I will close this bug.
Best regards,
Niels
next prev parent reply other threads:[~2024-07-14 9:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-12 11:33 bug#72088: eglot: Segregates language servers in a way that hampers polyglot language servers Niels Thykier
2024-07-13 6:15 ` Eli Zaretskii
2024-07-13 16:29 ` João Távora
2024-07-14 4:37 ` Eli Zaretskii
2024-07-14 7:31 ` Niels Thykier
2024-07-14 8:01 ` João Távora
2024-07-14 9:36 ` Niels Thykier
2024-07-14 9:46 ` Niels Thykier [this message]
2024-07-14 10:30 ` Niels Thykier
2024-07-14 9:48 ` João Távora
2024-07-14 12:01 ` Niels Thykier
2024-07-14 13:21 ` João Távora
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=cf3230b5-f9e0-4c66-9474-b65e388ae49b@thykier.net \
--to=niels@thykier.net \
--cc=72088@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=joaotavora@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.