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: Make all tree-sitter modes optional Date: Thu, 16 Feb 2023 13:56:05 +0200 Message-ID: <9319d220-dd73-1873-096d-5797410677f6@yandex.ru> References: <83o7rexe2n.fsf@gnu.org> <83h6x5xym7.fsf@gnu.org> <83h6wr6gmz.fsf@gnu.org> <868ri140sr.fsf@mail.linkov.net> <83fsc92gbz.fsf@gnu.org> <83cz6ccagy.fsf@gnu.org> <838rgzaqmj.fsf@gnu.org> <7bad77ae-a176-d49b-5115-dbadf7e6d1bc@yandex.ru> <3112fa15-8d1c-679a-f319-cf659b097be4@yandex.ru> <831qmq9jjr.fsf@gnu.org> 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="20466"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Cc: monnier@iro.umontreal.ca, acm@muc.de, juri@linkov.net, casouri@gmail.com, larsi@gnus.org, jostein@secure.kjonigsen.net, emacs-devel@gnu.org To: Theodor Thornhill , Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Feb 16 12:56:44 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 1pScsW-0005BX-Gu for ged-emacs-devel@m.gmane-mx.org; Thu, 16 Feb 2023 12:56:44 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pScs4-0005mw-19; Thu, 16 Feb 2023 06:56:16 -0500 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 1pScs1-0005m4-Ib for emacs-devel@gnu.org; Thu, 16 Feb 2023 06:56:13 -0500 Original-Received: from mail-ej1-x634.google.com ([2a00:1450:4864:20::634]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pScrz-000788-Kf; Thu, 16 Feb 2023 06:56:13 -0500 Original-Received: by mail-ej1-x634.google.com with SMTP id ky6so4594801ejc.0; Thu, 16 Feb 2023 03:56:10 -0800 (PST) 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=fFPx9diU0w1jZN95lqSILBqtGz9aK0B/3gt8iIBx4IM=; b=eZb8DrbC5d3cLjWLHPnc7P1LjatUukgBP4ejZ0RVcF1zS0dG53VrYAQVDY+hpV0xGM UsT7LIMITmj/qEqsfCdF/G9cQ3eRRMMnanYv79SK0rGvuPT0AHvTwrSGU67OVMEY3Y4f iHmgDsXmdDy0CYPxAiTm01zMrEJv8k6Z11wmwwefRI5nPnA9DLuTf0ZkNJDBf8hk2vBX uk1y+nMcJkQOf9SKbj9+nOGb2s7BJgqvGNMUWbR5cRsysUMp1L7v/D6Eml6TWQDegrLj IPJc3BZ2TIH75XPT/VNMJfVuZLkRF6wwXsf20LXpn8AzuSWAkwfQPiOFqUsTKhFwwhJe NioA== 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=fFPx9diU0w1jZN95lqSILBqtGz9aK0B/3gt8iIBx4IM=; b=7A4qiJCJ3t1bIr+qtp7FLE8RBpbmDDI/1QR7fMc4xTYBVvKXpC3rpCgzYq9RkRr1th pii5vxj9OAm50rTkB5V7/BwoY4ma0EbfcJuTBtax23xiJoeu7eOL0csa2A5x1qAZczhT H2xziwfUH6TcEXPm20y4LH8AuzttEhNsJwNSvBovq8wARzbevKY4sZ5ZJ6yOxd61PoXr kyGEY6s03NGNss670jWxO7hpzAUyjbn1128GfBQoORYTTObyJ9J+zSsw0JuHCCBTHVBY EKdILDmC6yitwd0u8qViwRPkrWPj+vH/n0hLSsQDJyQjHPpTlSIvjia6LLrjShE+bfnJ jJcg== X-Gm-Message-State: AO0yUKV97PWIBR5dYnTAFL9DcI7mUmPIhk0pmF7gCNgAZ6AAgM5Hbm7r HNPdtPBfo86OaTQbRvYkSpw= X-Google-Smtp-Source: AK7set8zohggNZSTk6iQ5B8dZEnnMBtVjkgzj6hXaBsjadie7O2QzqZXPOJJ7ClvlQatuWUtdY/dcw== X-Received: by 2002:a17:906:328a:b0:8b1:293a:ef21 with SMTP id 10-20020a170906328a00b008b1293aef21mr4965083ejw.64.1676548568343; Thu, 16 Feb 2023 03:56:08 -0800 (PST) Original-Received: from [192.168.0.2] ([46.251.119.176]) by smtp.googlemail.com with ESMTPSA id p9-20020a17090653c900b008b13039003csm719828ejo.166.2023.02.16.03.56.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 16 Feb 2023 03:56:07 -0800 (PST) Content-Language: en-US In-Reply-To: Received-SPF: pass client-ip=2a00:1450:4864:20::634; envelope-from=raaahh@gmail.com; helo=mail-ej1-x634.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-0.257, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:303403 Archived-At: On 16/02/2023 09:53, Theodor Thornhill wrote: > To me the last point here is the important one. We kinda "rushed" the modes in so that the treesit backend would have anything to show for in emacs-29. We've tried many times to devise a mechanism for it to be unintrusive, and definitely so for the cc mode equivalents. Yes they are far behind them in some respects, so there was never a point to make them the default for the foreseeable future. Nobody is arguing about whether the modes should be default at the moment. > (make-language-layer 'js-layer > :major-mode 'js-ts-mode > :lsp 'eglot > :dagnostics 'flymake) If we do something like that, I'd rather we try for a scheme where we don't need to enumerate the "swappable" features in advance -- aside from the major mode, of course. But Eglot and friends plug into a language through indirection. Other than that, the user still needs to 'M-x eglot' or 'M-x lsp', or enable global-flycheck-mode, so the declarations like above seem redundant. To clarify, the example above looks nice, but there are a lot more programming related minor modes than the LSP clients and Flymake/Flycheck.