From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.devel Subject: Re: Renaming eglot -- or at least add an alias? Date: Tue, 11 Oct 2022 20:19:26 +0300 Message-ID: <0ef04e1e-3f6c-31b6-4852-0c9c2c43b912@yandex.ru> 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> <87ilkqbsp3.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33301"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Cc: emacs-devel@gnu.org To: Theodor Thornhill , Eli Zaretskii , rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 11 19:26:03 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 1oiJ10-0008Ug-Hs for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 19:26:02 +0200 Original-Received: from localhost ([::1]:43030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiJ0z-00077t-Cj for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 13:26:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51212) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiIvM-0003nv-2W for emacs-devel@gnu.org; Tue, 11 Oct 2022 13:20:12 -0400 Original-Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39492) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiIv9-0002vv-T3; Tue, 11 Oct 2022 13:20:05 -0400 Original-Received: by mail-wr1-x42c.google.com with SMTP id f11so22677945wrm.6; Tue, 11 Oct 2022 10:19:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=OB5cqFb53HF/AWunsiUI4QG+IGsI+UzFmCVuL8SF3ck=; b=KWG7ILfG1xUlru8AKWrxGlcQRP7xY30UjSyC41zDm4IoCDNQsRU3c9U9h95+SlamxO 5OWkbNDqnCJz7gf0wT4IW/lpXFczVtLHZxhaCVb8IGpWy4IPfvamUzjW91FPtuHwobMy vwTwYBdUHGPVtlsziFSP2k4f21ILwtp8cDqfVTr0SKnRsKDLF0dlB+o8sIz2Z54aqzHN zittsBL5sfQnwouXQB68HHxePtJww9xKl7Df37coN4TmtEL5AEBgw7WSbe2arIeSvwGj ZMss0FkyokyBrgZ6MxUSvQBZElDziz7ZzN8sHvhDKuw4iexZP7Z6EwrH529g8sLWNp8v 57vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OB5cqFb53HF/AWunsiUI4QG+IGsI+UzFmCVuL8SF3ck=; b=dyHIa2uyF2fEzFWDYMiiHKSscbk4DMbQNjZxCO/1zgTO0UwIRRm7hK2Xl5lI1a/4cU 2mlC7+A3GDqJo8a1tYeMhmkJ6HIN8IJe9oobyvfDVpHOoNAIUkRsp8KNWWPdNzflw3QX tNSCYdOcuaZWfxCqRQx2PAxmrHG5qKXvNadz9G+m32UHE36B74+hmjO09pswjxJ0rk+I 70cauGXnorK/TzU5x4vXd19fFVJLnYVScDLFKkBKVoNtQdbaXS+UWms/OTrYt88FdnG0 QqQIXl3H/m/vCBaMyEEMe3o1MxR1CR694/2OHHtwPw1OnqALlwHFrNAJz01qiKCvBvyT hMnQ== X-Gm-Message-State: ACrzQf3j+bTqsCBQJBPHyXViouthcGWAAkKGK93qEsiiwcsQPblcLoIy yPPCtCIkSjE6zdeHcchB7vQ= X-Google-Smtp-Source: AMsMyM77r9MmXgmY7dNW5hsnVmlRTv6tnp/2sCYK6Yu0G7SQll/LukxwFLNhr2HjLW5fmSIhdYLkHA== X-Received: by 2002:a5d:404b:0:b0:22e:331e:1cba with SMTP id w11-20020a5d404b000000b0022e331e1cbamr15279779wrp.488.1665508773971; Tue, 11 Oct 2022 10:19:33 -0700 (PDT) Original-Received: from [192.168.0.6] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id g6-20020a05600c4ec600b003b477532e66sm3712745wmq.2.2022.10.11.10.19.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 11 Oct 2022 10:19:33 -0700 (PDT) Content-Language: en-US In-Reply-To: <87ilkqbsp3.fsf@thornhill.no> Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=raaahh@gmail.com; helo=mail-wr1-x42c.google.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-2.934, 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:297510 Archived-At: On 11.10.2022 12:44, Theodor Thornhill wrote: > 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). Here's also a comment on HN by the author of TreeSitter supporting this view: https://news.ycombinator.com/item?id=18349488