From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Renaming eglot -- or at least add an alias? Date: Tue, 11 Oct 2022 11:44:24 +0200 Message-ID: <87ilkqbsp3.fsf@thornhill.no> References: <83pmfdduix.fsf@gnu.org> <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> <835ygqg1bh.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="4855"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Eli Zaretskii , rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 11 11:48:24 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 1oiBs8-00010X-2R for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 11:48:24 +0200 Original-Received: from localhost ([::1]:44126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiBs6-00066U-Fn for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 05:48:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiBoP-0004Lp-DZ for emacs-devel@gnu.org; Tue, 11 Oct 2022 05:44:35 -0400 Original-Received: from out0.migadu.com ([2001:41d0:2:267::]:30585) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiBoL-0002ez-Bq; Tue, 11 Oct 2022 05:44:31 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1665481465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9kHmi/ssvXsMARB/iRi/J3Ucd9gZ0lofovp9aAt4ORw=; b=Fystd6xmEnvaUecj76THMAl05wY6xmxJU4YHq2qXwgDG9gHj2u9TEjmeq7E8UjyJBSdcDT BsSfnQ60MxUtk20OkZYeEeEmGVK//WSRrSh+NnXjVbCsxJdfdEwluoN55jIMBtJGLutBCc u2qBbrWxmHAS+dUsUhs0v2vSXmnwrDqX8cUGs2mkH5xtv6293rbRQQM2kq9rTrK8SPgMPQ p2du/HTnL8qrXgn0PHJMkVEpuHbc/CJPBw2DcVVsgynHFjiq3HhcrZD2amNzR+Ku9+m1pI j4isPOnuR89eS5c+ma888tMh6WnrjW6X0rSx0KGUOSxLCKfi+xP+r5+VmjfH/A== In-Reply-To: <835ygqg1bh.fsf@gnu.org> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=theo@thornhill.no; helo=out0.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_PASS=-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:297466 Archived-At: Eli Zaretskii writes: [...] >> > > If they are intersubstitutable, in principle, maybe they ought to have >> > > the same user interface so that most users would not notice or care >> > > which one is doing the job. >> >> > You are basically asking the same questions I did. >> >> Good that we are following the same line of thinking. >> Could you show me the answers you got? > > I don't have any answers yet, which is why I posted the questions. One major difference is that tree sitter does just parsing, and provides interface to access the returned tree. It works on _one_ file, and does not care of project semantics, package managers, dependency fetching etc etc etc. That's LSPs job. Going to references, opening files in directories outside of the project is also for LSP, thus Eglot. Returning completions etc etc etc. Tree-sitter _cannot_ do these things. However, it is fast, which is the major selling point. That is why you'd want to use that for indentation, font locking and the simpler things. You can also hack on tree-sitter. When provided with a proper api it is easy to extend yourself and add utilities in your own config. Not so much for LSP. Whatever is to be done must be supported by said server. They look similar, but in reality they are not. Yes, both can font-lock, but that's almost where the similarities end. Because all of the interaction between server and client in lsp is json there's a huge overhead with parsing and shipping things into the emacs user interface. So IMO what tree-sitter is good at should be left to tree-sitter. (font locking in the server is often just a wrapper of tree-sitter shipped over json anyways). Theo