From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Wilhelm Kirschbaum Newsgroups: gmane.emacs.bugs Subject: bug#61996: 30.0.50; Submitting elixir-ts-mode and heex-ts-mode Date: Mon, 06 Mar 2023 19:23:39 +0200 Message-ID: <874jqx3h47.fsf@gmail.com> References: <87mt4qibnk.fsf@gmail.com> <83cz5m8515.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28434"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 Cc: 61996@debbugs.gnu.org, theo@thornhill.no, casouri@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Mon Mar 06 18:50:50 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1pZEz4-0007H7-Q5 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 06 Mar 2023 18:50:50 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pZEyU-0002pq-T0; Mon, 06 Mar 2023 12:50:14 -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 1pZEyQ-0002lc-RH for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 12:50:11 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pZEyI-0001Vk-In for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 12:50:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pZEyI-0007Qh-A9 for bug-gnu-emacs@gnu.org; Mon, 06 Mar 2023 12:50:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Wilhelm Kirschbaum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Mar 2023 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61996 X-GNU-PR-Package: emacs Original-Received: via spool by 61996-submit@debbugs.gnu.org id=B61996.167812496528510 (code B ref 61996); Mon, 06 Mar 2023 17:50:02 +0000 Original-Received: (at 61996) by debbugs.gnu.org; 6 Mar 2023 17:49:25 +0000 Original-Received: from localhost ([127.0.0.1]:43580 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZExh-0007Pm-1H for submit@debbugs.gnu.org; Mon, 06 Mar 2023 12:49:25 -0500 Original-Received: from mail-wr1-f52.google.com ([209.85.221.52]:33594) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pZExe-0007PX-PB for 61996@debbugs.gnu.org; Mon, 06 Mar 2023 12:49:23 -0500 Original-Received: by mail-wr1-f52.google.com with SMTP id v16so9770762wrn.0 for <61996@debbugs.gnu.org>; Mon, 06 Mar 2023 09:49:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678124957; h=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=zaX5yF7zeGKNVbkR6HFpbNOoM0z1lYGwqiIDQ9Y36fY=; b=I6RTrTyAyAu7FSNRQf9l2bW6LDiaCyS8sPeUpBSzjVh9bZWYfCbgN2f7t2nmDBhjEo UzQ7xUyiJ8mixcxYCDFrDfs/Xdjr8VcyiRohRjbk53hLKHXz27YOiLenARqClz7kA9cr IAxC+Yk/V7Wb1US6XEkLerYmzbYSuTdJDYCh4EdzGwOwulOMePMa3HGLdzSxHTVtyH0f 00Sjv9WHtX5vW8V0Z4S0sGVR95dn9fm+UCawtUC2GzSHv/eRnL9IoJI/C6JttbnHfM/G PCoGIsD06ZvgP5lnD15NKhrldPYtz/CyMiZW6gkujaF7Tly0oHOGSvZtO4YrI7JInhM1 2AVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678124957; h=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=zaX5yF7zeGKNVbkR6HFpbNOoM0z1lYGwqiIDQ9Y36fY=; b=XdsUlt4t573A6ApQ6ht17w12AdNglLjooQVUiY3sAInexlTnt9Vhf/cG9Nftozjtac y8jcDnb2jcZZ0Sj/knmJ3TeaDtOdRfga2d8O7sSZjAJE7kXYilKmk/O3ygG6v/rtrZ9a 5e3LfjKMafMIv9sIiposqfxxKx8p2WTJnh/pvDCYW606d+yC0IHfQpbqzibVZsygdQIx MFVHAogtOCKgDlkIMYhkInF9QAkj5hZHoPZcwqWVZVVJOqW1jZukHm3K+nU/ilkIeCkx 3Sq3JQWydR5Ow0H+LYa5yx6alLcXeiTUsZXm5C9Z5d7fn6jOXYRQ/288bhuZGqzMmm/7 zpKA== X-Gm-Message-State: AO0yUKXYS3so8X9XpmkLeBc1eFPPtfM88h5HgD8iflZSvKc5z80hl37v n5dhzDGugNThMJy1i2BSGpM= X-Google-Smtp-Source: AK7set/qFlxTNWM1il+S9oo9ZMClZO7ZnAxYxTG1oQIKNOBRhKysxTDZPWNBTvj2sDlHnNVP9Q0CJw== X-Received: by 2002:adf:f2cb:0:b0:2c9:867e:7b6f with SMTP id d11-20020adff2cb000000b002c9867e7b6fmr6412366wrp.3.1678124956704; Mon, 06 Mar 2023 09:49:16 -0800 (PST) Original-Received: from melissa.local (ec2-13-245-158-50.af-south-1.compute.amazonaws.com. [13.245.158.50]) by smtp.gmail.com with ESMTPSA id n16-20020a5d67d0000000b002c758fe9689sm10350066wrw.52.2023.03.06.09.49.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Mar 2023 09:49:16 -0800 (PST) In-reply-to: <83cz5m8515.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257408 Archived-At: Eli Zaretskii writes: >> Cc: casouri@gmail.com, theo@thornhill.no >> From: Wilhelm Kirschbaum >> Date: Mon, 06 Mar 2023 09:04:13 +0200 >> >> I would like to submit elixir-ts-mode and heex-ts-mode to emacs >> master. > > Thanks. Please state in the comments to each mode with which > grammars > is it compatible, so that users could know from which URL to > download > the required grammar libraries. The heex-ts-mode mentions that, > but > elixir-ts-mode doesn't, AFAICT. > Will this make sense in the Commentary section: "The tree-sitter grammar for Elixir can be downloaded from https://github.com/phoenixframework/tree-sitter-heex." >> +(defcustom heex-ts-mode-indent-offset 2 >> + "Indentation of Heex statements." >> + :version "29.1" > > I think these modes should go to the master branch, so "30.1" is > more > accurate. > Thanks, will change. >> +(if (treesit-ready-p 'elixir) >> + (progn >> + (add-to-list 'auto-mode-alist '("\\.elixir\\'" . >> elixir-ts-mode)) >> + (add-to-list 'auto-mode-alist '("\\.ex\\'" . >> elixir-ts-mode)) >> + (add-to-list 'auto-mode-alist '("\\.exs\\'" . >> elixir-ts-mode)) >> + (add-to-list 'auto-mode-alist '("mix\\.lock" . >> elixir-ts-mode)))) >> + >> +(if (treesit-ready-p 'heex) >> + (add-to-list 'auto-mode-alist '("\\.[hl]?eex\\'" . >> heex-ts-mode))) > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ > Copy/paste error, I presume? > > Thanks. This was intentional, but perhaps a bad choice and lack of understanding of how the -ts-modes should be activated. elixir-ts-mode should ideally load the HEEx grammar, but should also technically be able to function without. The Elixir language author mentioned that heex can practically be seen as part of Elixir, so requiring heex-ts-mode makes sense, sort of. heex-ts-mode and elixir-ts-mode used to be in one file, but I was asked to split them for the MELPA submission. The HEEx language should actually also be able to embed Elixir, but this is not essential and we can do without imo. Would it make sense have them in one file? I will update the patch with the above changes including some tests.