From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Renaming eglot -- or at least add an alias? Date: Wed, 12 Oct 2022 20:24:06 +1100 Message-ID: <86r0zdcrnj.fsf@gmail.com> References: <86wn9ji3ma.fsf@gmail.com> <86tu4lsnqk.fsf@gmail.com> <8335c0p2fn.fsf@gnu.org> <83leproov6.fsf@gnu.org> <83fsfzonwn.fsf@gnu.org> <5a1e604c-4500-a476-da3d-259d9057a7f0@yandex.ru> <838rlromxu.fsf@gnu.org> <83h70dk3wf.fsf@gnu.org> <83fsfxk30x.fsf@gnu.org> <83r0zdd1cy.fsf@gnu.org> <83pmexcy1n.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3795"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.0; emacs 29.0.50 Cc: Yuan Fu , rms@gnu.org, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 12 11:36:34 2022 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 1oiYAE-0000nb-M1 for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 11:36:34 +0200 Original-Received: from localhost ([::1]:32820 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiYAD-00060j-K0 for ged-emacs-devel@m.gmane-mx.org; Wed, 12 Oct 2022 05:36:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35540) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiY7l-0003V6-JC for emacs-devel@gnu.org; Wed, 12 Oct 2022 05:34:01 -0400 Original-Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]:37384) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiY7j-0004rC-Vf; Wed, 12 Oct 2022 05:34:01 -0400 Original-Received: by mail-pj1-x1032.google.com with SMTP id p3-20020a17090a284300b0020a85fa3ffcso1490641pjf.2; Wed, 12 Oct 2022 02:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:from:to:cc:subject:date :message-id:reply-to; bh=Kk/QoLT3vS8ypTqCXwEgjEkYR2N0EY68Dy6e/m8u8B0=; b=ijfis2uO/5cmXpHNQmIMNDHf153sak9QPjSgk9LuzHHQ3lQhgSmXW78vMfFNIbIlsm gxSsI0XUwT/q4I4vadQFIvVrHroUEth5o/MNDqFEf/evxAjLTYuMXIuJbHgKorifu7n/ E1GwGwbbQ6O5/k9hS7U2d8J3tafQWU23fYF0T0weRSK2Lc8w9nm2xVOtFDHO3dQXWMpz qA6B1ve769ZjXn9z+aAto4AraQg6EpuxAYU//Ecld49qwbUgrlmMe6ez+sY+cMq1o/e+ plBqwWWgRTiWDJAQxMuAlYPzpY0QkyFM+bTMauD6zCOGyeCxWcbTKtUDQ+HqD0+RDBC4 q+7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:in-reply-to:date :subject:cc:to:from:user-agent:references:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=Kk/QoLT3vS8ypTqCXwEgjEkYR2N0EY68Dy6e/m8u8B0=; b=c9RTJbaRXQE37z5TJau58GAf83aGZs4ov0hIQx5Nu/LojGzNYgWUoRXDgdQmao+NuH S07Udt28T6s2XgAEMCg/0VUkMM8RoMhoGuMpB3N42i7YLscP1o+VAl9bSe15PeHAul5h 3YO02C5AShSkFhwKuUo7mJMDc93UT2fKqkEnVRDpJA0YPkEzhys9/delBUNrBY716e+I zb+NXSHlzFMOTrsVqv91sIGjIxgIkXB0cvE8C4KMNknMp3Zw4LEIT4fFp+IhxWuHlmNl o+7hbvDhsaX8HmgepYFKA8UdptIjWSIj+hcXFZIx5XW+Mwin2EypvicMh3+YFxyT8HhN WsKA== X-Gm-Message-State: ACrzQf3vkONMqrVrCToEGjAmqlspXhSp3d0rZ0oY2u6CLW8i4A9azBpr Kh4qo/hAAarDGmnEThQkYY1RuaFqDII= X-Google-Smtp-Source: AMsMyM4KzLpLvPS+yKEaJsTgFMKupm/aIxwbLkn5xZs1AT9cunvyRZ7B7Ila3IgGtb4x+BtjItm14g== X-Received: by 2002:a17:903:124b:b0:179:da2f:2457 with SMTP id u11-20020a170903124b00b00179da2f2457mr28274740plh.156.1665567237171; Wed, 12 Oct 2022 02:33:57 -0700 (PDT) Original-Received: from dingbat (124-169-22-230.dyn.iinet.net.au. [124.169.22.230]) by smtp.gmail.com with ESMTPSA id b7-20020aa79507000000b005635477c42dsm6196506pfp.133.2022.10.12.02.33.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Oct 2022 02:33:56 -0700 (PDT) In-reply-to: <83pmexcy1n.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=theophilusx@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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" Xref: news.gmane.io gmane.emacs.devel:297586 Archived-At: Eli Zaretskii writes: >> From: Yuan Fu >> Date: Tue, 11 Oct 2022 23:37:28 -0700 >> Cc: Richard Stallman , >> emacs-devel@gnu.org >>=20 >> > This discussion is primarily about our design and implementation >> > decisions: whether some features need to have more than one "back-end" >> > or just one, decided by us. AFAIU, we haven't made the final >> > decisions yet. Whether and how users will control that comes later. >> > If we decide that each feature will have only one "back-end", the part >> > of selecting a "back-end" is automatically resolved to a non-issue. >>=20 >> IMO in some sense, eglot and major mode sits at the same level, and tree= -sitter a level >> lower. Consider this: take imenu as an example. Major mode sets >> imenu-create-index-function for imenu to function. A major mode now has = two options >> available, one function uses tree-sitter and one don=E2=80=99t. If the u= ser enables eglot, eglot >> sets menu-create-index-function to eglot-imenu, overriding major mode=E2= =80=99s function. From >> this perspective, tree-sitter is just a mechanism a major mode could use= , not unlike >> syntax-ppss, while eglot do things its own way, replacing parts of the m= ajor mode=E2=80=99s >> functionality with its own. >>=20 >> So it=E2=80=99s not really =E2=80=9Ctwo back-ends=E2=80=9D, tree-sitter = and eglot are different in fundamental ways. > > My vision of the relation is different from yours. Major mode sets > imenu-create-index-function to some code that can either use > tree-sitter or some other way of detecting the symbols for the index. > That other way includes Eglot. The fact that Eglot overrides the > mode's setting is just an implementation detail. > > And none of that matters for the user, btw. Users don't care much > about implementation, they only care about the possible ways of > getting the functionality, and in this case there are 3 such ways. This all seems to get very confusing/complicated quite fast. In case it helps, as a user, for most of the languages I work in, here is what I would want (assuming eglot/tree-sitter support available for each language. - Tree-sitter for font lock and indentation. I don't think eglot will be fast enough given json parsing and process comms etc. =20=20 - eglot for linting, xref, completion, doc lookup, code actions etc. Most of the time, I want this on a project rather than a file basis. Also, I want something which is consistent with co-workers who use other editors, but the same language server. So for me, I want to be able to specify for xxx-mode, use tree-sitter for font locking and indentation and eglot for everything else. Being able to easily set that in myh init will be what I am looking for.=20