From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [GNU ELPA] eglot-x.el: Protocol extensions for Eglot Date: Fri, 05 May 2023 17:39:22 +0300 Message-ID: <835y96j10l.fsf@gnu.org> References: <874jorc7q2.fsf@betli.tmit.bme.hu> <83h6sqj4ed.fsf@gnu.org> <87354auafu.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17859"; mail-complaints-to="usenet@ciao.gmane.io" Cc: felician.nemeth@gmail.com, emacs-devel@gnu.org To: =?utf-8?B?Sm/Do28gVMOhdm9yYQ==?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 05 16:39:20 2023 Return-path: Envelope-to: ged-emacs-devel@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 1puwad-0004W9-Ku for ged-emacs-devel@m.gmane-mx.org; Fri, 05 May 2023 16:39:19 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1puwZq-0003My-TH; Fri, 05 May 2023 10:38:30 -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 1puwZp-0003Mg-S1 for emacs-devel@gnu.org; Fri, 05 May 2023 10:38:29 -0400 Original-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 ) id 1puwZp-0007ig-Jx; Fri, 05 May 2023 10:38:29 -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=VyjX/9/sl/o8ryexIG58zfiuYblKRZ/mP9+RXKldFF4=; b=mAaNYNWrOshbhik2HF7Y ratTikt+PxVCwHloE5yjLRp7ASlemebVHIOhBquEhOPIOzfzz2xH+c1FcOev/1rzti1pNoS6FvTUc 7LrB/4+O727MGzRavU9aHuWZB1GgWdgDPpj8xVn7a6bQU+Eap8CO0ZrnfnimCEEMjaXh9+z5tgE7n 6i4Lhuj4u4Hdj0o5fL9RJySYroCTU3YaEe59c9Pn1l6G/f7+M6hrJuLbzlhU7YdWnA5jpznOIBPBF yWZkva9nsj85e8PaksJN5gadGwBwvTWrsxGXiyuWc1ZaJXy1SwFXGJtIurRczXTSR7Z+zn6bJzIZ6 PkS2Mb0fZ85VKA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1puwZp-0003DM-4D; Fri, 05 May 2023 10:38:29 -0400 In-Reply-To: <87354auafu.fsf@gmail.com> (message from =?utf-8?B?Sm/Do28g?= =?utf-8?B?VMOhdm9yYQ==?= on Fri, 05 May 2023 15:20:21 +0100) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:305881 Archived-At: > From: João Távora > Cc: Felician Nemeth , emacs-devel@gnu.org > Date: Fri, 05 May 2023 15:20:21 +0100 > > > At the very least, eglot.el could benefit from offering a > > supported mechanism for adding such extensions; there should be no > > need for using advice for that. > > I agree. Eglot has an API. I haven't looked at eglot-x in depth but I > suspect it's using some of this API in part. If it's not sufficient, > then Eglot could enhance it. What part of eglot-x is using advice, if > any? > > > João, why would you not consider supporting these extensions as part > > of eglot.el? > > They're non-standard, each server has its own set of extensions, which > in some cases could be volatile and become obsolete. Furthermore, I > would suspect that if eglot-x.el modifies eglot.el's standard behaviour, > it is not as well tested across different servers and could provide a > surprise for users of other servers. I understand and agree in general, but surely each change should be judged by itself, and some, maybe many, might not have these problematic aspects? > A guiding principle of eglot.el (and indede LSP) is to not have any > server-specific code. If "server-specific" behavior is, for example, just some non-standard capabilities, that doesn't count as "server-specific code" in my book. After all, a standard-compliant server could very well implement only a subset of the capabilities documented by the standard. > So in general, I think having eglot-x.el as a kind of laboratory where > authors can experiment freely with new LSP-powered UIs is an excellent > approach. As these extensions make their way into the official LSP > protocol Eglot can support them. For example, I believe "inlay hints" > started as some kind of rust-specific protocol extension and is now > well-supported in Eglot for many servers (I use it daily). > > We could consider bundling eglot-x.el with the Eglot ELPA package (I do > hope Felicián is aware of the ins and outs of :core packages though). > And I think a separate package isn't really bad either. But it should not use advice, IMNSHO.