From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Niels Thykier Newsgroups: gmane.emacs.bugs Subject: bug#72088: eglot: Segregates language servers in a way that hampers polyglot language servers Date: Sun, 14 Jul 2024 11:46:52 +0200 Message-ID: References: <6e65694c-88d6-4c54-93a8-2ffb843ce6d0@thykier.net> <86bk31lsvd.fsf@gnu.org> <86cyngk2qm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="12020"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: 72088@debbugs.gnu.org To: =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jul 14 11:49:19 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1sSvr5-0002t9-F6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 14 Jul 2024 11:49:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sSvqs-0005aW-3y; Sun, 14 Jul 2024 05:49:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sSvqo-0005a0-Av for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2024 05:49:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sSvqo-0007QO-36 for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2024 05:49:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sSvqo-0006gr-EN for bug-gnu-emacs@gnu.org; Sun, 14 Jul 2024 05:49:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Niels Thykier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 14 Jul 2024 09:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72088 X-GNU-PR-Package: emacs Original-Received: via spool by 72088-submit@debbugs.gnu.org id=B72088.172095051625669 (code B ref 72088); Sun, 14 Jul 2024 09:49:02 +0000 Original-Received: (at 72088) by debbugs.gnu.org; 14 Jul 2024 09:48:36 +0000 Original-Received: from localhost ([127.0.0.1]:57173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSvqN-0006fx-K0 for submit@debbugs.gnu.org; Sun, 14 Jul 2024 05:48:35 -0400 Original-Received: from mailrelay5-1.pub.mailoutpod2-cph3.one.com ([46.30.211.180]:35297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sSvqK-0006fi-Uh for 72088@debbugs.gnu.org; Sun, 14 Jul 2024 05:48:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thykier.net; s=rsa1; h=content-transfer-encoding:content-type:in-reply-to:references:cc:to:from: subject:mime-version:date:message-id:from; bh=oz7HM+GcgVNR58cQwM9bm+t5m29l3kmHLpV7tchr6yU=; b=Tmc5OfkRBiPmUcp4xOTQxrdM08fTYJmh8P4Ei3QjnSkHAJQmnBVK6FGVoxQ0liu5nPGR9l1MUPNN9 Dz/+dZ+pfllsYkgOGbyEqoAhPj3+i4btq5qlAAz9E/O+8tjiQgaDDF1E2ixa6xRWD/qnv+g46+rddb HWkwuVuSyEn+2S3tkEV4OdbE4ASuMiQ+oyFUGn8ew+++SJ30Xs398UI23mgg1bFIpNAzLp0ar+j/9j yYn/obpogmW0+y++dl32g1W0U3nbprqYYcl5v9ATWLxDUKEUmNWv5k+YiP9JndxXTzOqBujkZeWzpN RaZ8joqRelpdjwAQfXzmye7esJEV2zw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=thykier.net; s=ed1; h=content-transfer-encoding:content-type:in-reply-to:references:cc:to:from: subject:mime-version:date:message-id:from; bh=oz7HM+GcgVNR58cQwM9bm+t5m29l3kmHLpV7tchr6yU=; b=qIGgpV+6Yp53OhRQwbOzDXl6wpgbd55efVX+ZPmCkbDjhxCobs4ZgovLB+Rp8qWc1FIbeOcoaPfip A+D6s/aAg== X-HalOne-ID: ff5f9a24-41c5-11ef-90d5-6f719e79c8e4 Original-Received: from [127.0.0.1] (tor-exit-50.for-privacy.net [185.220.101.50]) by mailrelay5.pub.mailoutpod2-cph3.one.com (Halon) with ESMTPSA id ff5f9a24-41c5-11ef-90d5-6f719e79c8e4; Sun, 14 Jul 2024 09:46:54 +0000 (UTC) Content-Language: en-US Autocrypt: addr=niels@thykier.net; keydata= xsFNBEoc+tABEAC2hwVc8hIXriemyLerYBq5Q7d0QrYkuvruWGRbDvfegqGJDopZb/Tq2jBm 2QwGIy7ikTxgOqcH2fQH5zJuYq6WC4ST9DdXghhqh6pm1e68dhyJrWmmdmgV42bvb5GvtMGC vfeSCsqJrp1yjJCHyJmBj33ExBhPr4YGLOJc45wol0LB8HfqietRaGKiS5Vsay6D+LUCEPKX EZD72nh+VdKZdy8YNBUF+e27LapLH+6dkH8wR7OJU8SoVwhVOZcpf4mjmw3iiQIvWKJhokhG K1cjZ7huIZEs+x0XlEwA1FWLCMp9Ktnum8NlF7uQfGEpfQ1Oofr50vxx8cnGoVnwUKIRcRx9 uBGRWehTBnbe/7CSXIbvWY7T4KHjbI33k8P6ytVxpVNHrSKK2P4Fb6Dsh7QondikzvMdlWqD h0rhjchpPXAUuqT/3ItSlJhllFkfTDUG26tFq1v3AlPLayPvFjkC9HUAiu5rqSJsNR/bDSxo /JfBerzzbqfw4aQ0iYoT/0zJ3PqaqsAqU8dHdTXHbrryzqM+sD65Q87ZhC9BFIXENplIQ91V JNxjuq0PEHJDZ9lAh3+Paa6LUAEhqGffTpdEo1iyqY6zDT6cBgFY7MWJiM8rWkI8IADj4aiz wBEud1nEjIVYZkk0qF8kFhvn3j88cfTV3/8OgRvL3lWsOoDEdwARAQABzSFOaWVscyBUaHlr aWVyIDxuaWVsc0B0aHlraWVyLm5ldD7CwZMEEwEIAD0CGy8GCwkIBwMCBBUCCAMEFgIDAQIe AQIXgBYhBLMTGkUdv998oFtBlwVLu599gGRCBQJk5 In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:288837 Archived-At: Niels Thykier: > João Távora: >> On Sun, Jul 14, 2024, 05:37 Eli Zaretskii 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