X-Loop: help-debbugs@HIDDEN Subject: bug#72088: eglot: Segregates language servers in a way that hampers polyglot language servers Resent-From: Niels Thykier <niels@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 13 Jul 2024 03:23:01 +0000 Resent-Message-ID: <handler.72088.B.172084097630463 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: report 72088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 72088 <at> debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@HIDDEN Received: via spool by submit <at> debbugs.gnu.org id=B.172084097630463 (code B ref -1); Sat, 13 Jul 2024 03:23:01 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jul 2024 03:22:56 +0000 Received: from localhost ([127.0.0.1]:54951 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sSTLc-0007vA-2d for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 23:22:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:57064) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <niels@HIDDEN>) id 1sSEXU-0006K0-H3 for submit <at> debbugs.gnu.org; Fri, 12 Jul 2024 07:34:13 -0400 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 <niels@HIDDEN>) id 1sSEXT-0006FT-GZ for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 07:34:12 -0400 Received: from mailrelay5-1.pub.mailoutpod2-cph3.one.com ([2a02:2350:5:404::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <niels@HIDDEN>) id 1sSEXP-0003Rz-Of for bug-gnu-emacs@HIDDEN; Fri, 12 Jul 2024 07:34:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thykier.net; s=rsa1; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=VN3j25iX4yn87kBomFDTMtQ2jmE7C1wk5LXbo8O+YZ4=; b=CPBkQop5VHqLf3A8fq0zqib+/XFHzZPweeaNMshABkW1qz6/Lgo069Mz+aXV8Ava+Zkc8aGs6E/zg mnlO6lkCjVwuziqYhQ+BB/zQiWl7UjwfaXNsjTJzPwg+AGArlJNLdLCEIIS+qkFlyhuWI80Iou1viJ gbcVvxzDJBzHwGzgXKMBx5mu7htaOvSD/jb+IjoxY+kcie5g1+w4kMXerzhG9xdQZ920/i4EoFEte6 K8/oJnfSZHH+WolHjP0DGzQSqdAyMsWE2zxGFH33IvPvk8t1vsyqqyh/RWS7xghJ/5gjoZmXePaJuX aT0IKHKpToAcI3/Uiv9MDQ7dXY4wfLQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=thykier.net; s=ed1; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=VN3j25iX4yn87kBomFDTMtQ2jmE7C1wk5LXbo8O+YZ4=; b=m3nQyh/CFO41bXfPFSqSjA4TxXiWSv5T0/ss1BiWZkAqRBjNLxNrHDVn5QFOMHcx9cwL3zSi0+l3+ fRbPfapCQ== X-HalOne-ID: 9fa17d46-4042-11ef-abf1-6f719e79c8e4 Received: from [127.0.0.1] (unknown [185.220.101.187]) by mailrelay5.pub.mailoutpod2-cph3.one.com (Halon) with ESMTPSA id 9fa17d46-4042-11ef-abf1-6f719e79c8e4; Fri, 12 Jul 2024 11:33:59 +0000 (UTC) Message-ID: <6e65694c-88d6-4c54-93a8-2ffb843ce6d0@HIDDEN> Date: Fri, 12 Jul 2024 13:33:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Niels Thykier <niels@HIDDEN> Aut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x6cYLTqn22tcaGigoaBd8a8P31zRBtOc5sp grr5lttw/8XJ/b7KQ9p3ZFBhT2Vz8T4g3/3TwMg2LyvW6AbgbU1JEAz24PTuA72VhM2bhzVL /mTuIUp+ldr8mMgfkMEyKwlECMrf/TcNUm6qxghYM0RBusr8OatU/LoJJyiv+HBcv2h2I8Gw 9oWCSjRxQnWzM9m8cFRzJ85wknbP0QV6XeR+/NsHSKzGAQxVP/aHJ18uvbW1tWKVwcQbvzNW jhe5XQXmu1xCjDz3U8fYhsNwUZMpK8Ex8aWb3BN2+rQ2X9X/yTUY/z0SLBnGPpoiYGum8dhO w0dWGHlSeCLZ69I3zToVsMf1xZfiee8I3JW7l3WEjRY2bMw04Ms6c+Qx5L91AnG9XCtihQ1p 37AYZLplxT4i8GsSDFajAFLNE6W1qgCHtiB8xSgcsAiqJpMl+1xzeNU0OunRiCpc/OvGhbDk Y4AtBnRNxs8BI5d1pvL54Pc0RiKah4Oyz533pk9hX2O95+sDbQ2d9+yyoJ41+Kelz+IVjpAX I9cp9gABn2JbjA== Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Received-SPF: none client-ip=2a02:2350:5:404::1; envelope-from=niels@HIDDEN; helo=mailrelay5-1.pub.mailoutpod2-cph3.one.com X-Spam_score_int: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.3 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hi Thanks for providing LSP support in emacs. :) For reference, I used emacs 29.4 from Debian when I tested. If this feature has changed in emacs 30, then I would not have seen it yet (I am not tracking emacs/eglot development a lot). Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [209.51.188.17 listed in list.dnswl.org] 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [185.220.101.187 listed in zen.spamhaus.org] -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 0.0 SPF_NONE SPF: sender does not publish an SPF Record X-Mailman-Approved-At: Fri, 12 Jul 2024 23:22:50 -0400 X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: 0.3 (/) Hi Thanks for providing LSP support in emacs. :) For reference, I used emacs 29.4 from Debian when I tested. If this feature has changed in emacs 30, then I would not have seen it yet (I am not tracking emacs/eglot development a lot). I am working on a language server for Debian packaging (called `debputy`). The Debian packaging files consists of several different file formats with cross references between the formats. As a consequence, I built my language server to be a "polyglot" (multi-language). While testing with eglot, I noticed that my language server was not informed of all changes. As far as I can see, eglot spawns a language server per file format (major mode) and then only informs the language server of events (didOpen/didChange) for that major mode. This happens even through it is exactly the same command + args for both major modes. The next result is that my language server when used via emacs + eglot, requires the user to save a file before the language server can "see" the effect when you are working in a different file. I was a bit in doubt whether the spec accounted for polyglot language servers, so I asked in the LSP github for clarification. They made the argument that a language server should be able to see events for other file formats and suggested that I contacted you (the eglot maintainers) about this (https://github.com/microsoft/language-server-protocol/issues/1964). They acknowledged this was implicit and then listed the two key features they saw as supporting this implicit requirement (both of them boils down to DocumentSelector as I read it). I tried a static registration with a DocumentSelector on `**/debian/*` (I think it was hover docs, though it might have been completion), but my debugging suggested that my instances did not get didOpen/didChange events "across" the file formats even with this registration. Can we work towards a solution where I can ask eglot to provide didOpen/didChange events across formats? :) Best regards, Niels
Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) Content-Type: text/plain; charset=utf-8 X-Loop: help-debbugs@HIDDEN From: help-debbugs@HIDDEN (GNU bug Tracking System) To: Niels Thykier <niels@HIDDEN> Subject: bug#72088: Acknowledgement (eglot: Segregates language servers in a way that hampers polyglot language servers) Message-ID: <handler.72088.B.172084097630463.ack <at> debbugs.gnu.org> References: <6e65694c-88d6-4c54-93a8-2ffb843ce6d0@HIDDEN> X-Gnu-PR-Message: ack 72088 X-Gnu-PR-Package: emacs Reply-To: 72088 <at> debbugs.gnu.org Date: Sat, 13 Jul 2024 03:23:02 +0000 Thank you for filing a new bug report with debbugs.gnu.org. This is an automatically generated reply to let you know your message has been received. Your message is being forwarded to the package maintainers and other interested parties for their attention; they will reply in due course. Your message has been sent to the package maintainer(s): bug-gnu-emacs@HIDDEN If you wish to submit further information on this problem, please send it to 72088 <at> debbugs.gnu.org. Please do not send mail to help-debbugs@HIDDEN unless you wish to report a problem with the Bug-tracking system. --=20 72088: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D72088 GNU Bug Tracking System Contact help-debbugs@HIDDEN with problems
X-Loop: help-debbugs@HIDDEN Subject: bug#72088: eglot: Segregates language servers in a way that hampers polyglot language servers Resent-From: Eli Zaretskii <eliz@HIDDEN> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> Resent-CC: bug-gnu-emacs@HIDDEN Resent-Date: Sat, 13 Jul 2024 06:17:01 +0000 Resent-Message-ID: <handler.72088.B72088.172085137226189 <at> debbugs.gnu.org> Resent-Sender: help-debbugs@HIDDEN X-GNU-PR-Message: followup 72088 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Niels Thykier <niels@HIDDEN>, =?UTF-8?Q?Jo=C3=A3o_?= =?UTF-8?Q?T=C3=A1vora?= <joaotavora@HIDDEN> Cc: 72088 <at> debbugs.gnu.org Received: via spool by 72088-submit <at> debbugs.gnu.org id=B72088.172085137226189 (code B ref 72088); Sat, 13 Jul 2024 06:17:01 +0000 Received: (at 72088) by debbugs.gnu.org; 13 Jul 2024 06:16:12 +0000 Received: from localhost ([127.0.0.1]:54997 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1sSW3H-0006oJ-Tv for submit <at> debbugs.gnu.org; Sat, 13 Jul 2024 02:16:12 -0400 Received: from eggs.gnu.org ([209.51.188.92]:50304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1sSW3D-0006ng-9I for 72088 <at> debbugs.gnu.org; Sat, 13 Jul 2024 02:16:10 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <eliz@HIDDEN>) id 1sSW34-00079G-PH; Sat, 13 Jul 2024 02:15:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=kh5b5dj2K1wZo1jlfVC6xhCUOvQWYX+tsUCjbSGpEds=; b=W5PwescSAVDTeJKIHZx+ UrWdGIk3xef4DQxV5Dz0hMItQfmyqdyjsB/tEpHSs07y5rlwVjg4+5kywr05ItXNOnzuGRbGdQoV7 OlRKA9TDmktiVCS87WBaC2VgWQmS5Id7KpjBB3jUWLOPQK77bam0Jc0wln5rMl8NThyqgUsh/jVFG m/nl48olda0iKHjKseyXNI0flYmc5XFwGoA58/4HWutlqc/aW1fA5wiaguPMX3EQFNtyYz+YRRwcm BavRFJG+qOSc/I6KbNdJVySRwFq6CobHPNfmZZvKu66mjUlCVEp0tSHzyz1AhqiStahuMB97eRsAQ DLlXFauDzcGOWQ==; Date: Sat, 13 Jul 2024 09:15:50 +0300 Message-Id: <86bk31lsvd.fsf@HIDDEN> From: Eli Zaretskii <eliz@HIDDEN> In-Reply-To: <6e65694c-88d6-4c54-93a8-2ffb843ce6d0@HIDDEN> (message from Niels Thykier on Fri, 12 Jul 2024 13:33:56 +0200) References: <6e65694c-88d6-4c54-93a8-2ffb843ce6d0@HIDDEN> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -3.3 (---) > Date: Fri, 12 Jul 2024 13:33:56 +0200 > From: Niels Thykier <niels@HIDDEN> > > Hi > > Thanks for providing LSP support in emacs. :) > > > For reference, I used emacs 29.4 from Debian when I tested. If this > feature has changed in emacs 30, then I would not have seen it yet (I am > not tracking emacs/eglot development a lot). > > > I am working on a language server for Debian packaging (called > `debputy`). The Debian packaging files consists of several different > file formats with cross references between the formats. As a > consequence, I built my language server to be a "polyglot" (multi-language). > > While testing with eglot, I noticed that my language server was not > informed of all changes. As far as I can see, eglot spawns a language > server per file format (major mode) and then only informs the language > server of events (didOpen/didChange) for that major mode. This happens > even through it is exactly the same command + args for both major modes. > > The next result is that my language server when used via emacs + eglot, > requires the user to save a file before the language server can "see" > the effect when you are working in a different file. > > I was a bit in doubt whether the spec accounted for polyglot language > servers, so I asked in the LSP github for clarification. They made the > argument that a language server should be able to see events for other > file formats and suggested that I contacted you (the eglot maintainers) > about this > (https://github.com/microsoft/language-server-protocol/issues/1964). > They acknowledged this was implicit and then listed the two key features > they saw as supporting this implicit requirement (both of them boils > down to DocumentSelector as I read it). > > I tried a static registration with a DocumentSelector on `**/debian/*` > (I think it was hover docs, though it might have been completion), but > my debugging suggested that my instances did not get didOpen/didChange > events "across" the file formats even with this registration. > > Can we work towards a solution where I can ask eglot to provide > didOpen/didChange events across formats? :) João, any comments or suggestions?
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.