From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 01 02:30:32 2023 Received: (at submit) by debbugs.gnu.org; 1 Sep 2023 06:30:33 +0000 Received: from localhost ([127.0.0.1]:59726 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbxfs-0003l2-8R for submit@debbugs.gnu.org; Fri, 01 Sep 2023 02:30:32 -0400 Received: from lists.gnu.org ([2001:470:142::17]:53778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qbqaF-0000w7-FP for submit@debbugs.gnu.org; Thu, 31 Aug 2023 18:56:16 -0400 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 1qbqZv-0003iy-Gv for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 18:55:55 -0400 Received: from mail-b.sr.ht ([173.195.146.151]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qbqZg-0002hk-Dx for bug-gnu-emacs@gnu.org; Thu, 31 Aug 2023 18:55:46 -0400 Authentication-Results: mail-b.sr.ht; dkim=none Received: from git.sr.ht (unknown [173.195.146.142]) by mail-b.sr.ht (Postfix) with ESMTPSA id 9F04B11F230; Thu, 31 Aug 2023 22:55:38 +0000 (UTC) From: ~johnmuhl Date: Thu, 31 Aug 2023 22:55:38 +0000 Subject: [PATCH emacs 0/1] Add lua-ts-mode MIME-Version: 1.0 Message-ID: <169352253839.28940.16024479871485106701-0@git.sr.ht> X-Mailer: git.sr.ht To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=173.195.146.151; envelope-from=outgoing@sr.ht; helo=mail-b.sr.ht X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 01 Sep 2023 02:30:26 -0400 Cc: ~emacs/emacs-devel@lists.sr.ht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ~johnmuhl Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.0 (/) This email and patch were generated and sent using the web based =E2=80=9CPrepare a patchset=E2=80=9D feature of Sourcehut. I hope it will be = a useful POC for how Emacs could integrate a forge based pull request style workflow for occasional contributors with (hopefully) minimal hassle for those with push access. If it causes too much annoyance I=E2=80=99m happy to resend it the preferred way. I=E2=80=99ve also CC=E2=80=99d a Sourcehut mailing list to test the patch rev= iew feature so if this experiment continues it=E2=80=99d be good if we could keep =E2=80=9C~emacs/emacs-devel@lists.sr.ht=E2=80=9D included in any replies. Oth= er than that just do the usual patch review/handling. The sr.ht hosted version of the Sourcehut forge is considered =E2=80=9CGood enough to recommend=E2=80=9D by the GNU Ethical Repository Criteria in case anyone wonders about that. https://www.gnu.org/software/repo-criteria-evaluation.html Discussion or questions about Sourcehut or the workflow should probably go somewhere else but please CC me in that case. Thanks. //// This patch adds a lua-ts-mode for editing Lua files in Emacs >=3D 29.1. It is comparable in features to the NonGNU ELPA lua-mode. Shortcomings in the partially supported features are mentioned below. | Feature | lua-mode | lua-ts-mode | |------------------------+----------+-------------| | indentation =C2=B9 | Yes | Yes | | highlighting | Yes | Yes | | documentation lookup =C2=B2 | Yes | Yes | | imenu support =C2=B3 | Yes | Partial | | hideshow support | Yes | Yes | | outline support | No | Yes | | flymake support =E2=81=B4 | Yes | Yes | | which-func support | No | Yes | | inferior Lua =E2=81=B5 | Yes | Partial | 1. Indentation tries to follow the default EmmyLua style. This is the same formatter used by lua-ls so out of the box eglot-format and automatic indentation should agree about indents. 2. Both modes implement this feature by calling browse-url for the manual.html file that is normally distributed with Lua. lua-mode has a fallback that uses an online version, lua-ts-mode has no fallback but works with the online docs if customized. 3. I tried to follow the model used in other ts modes but it doesn=E2=80=99t seem like the results are very useful compared to Eglot/lua-ls. I=E2=80=99d like it to improve eventually but it=E2=80=99s low priority personally and wouldn=E2=80=99t oppose removing it for now. 4. Both modes require the Luacheck program to be installed. 5. The comint integration is the most basic. lua-mode supports things like "Send {buffer,region} to process" which I=E2=80=99d like to add but haven=E2=80=99t had time. Currently lua-ts-mode only supports starting an inferior Lua process and interacting with it directly. The patch file is also available from: https://git.sr.ht/~johnmuhl/emacs/commit/391699e.patch Thanks again. john muhl (1): Add lua-ts-mode admin/notes/tree-sitter/build-module/batch.sh | 1 + admin/notes/tree-sitter/build-module/build.sh | 3 + etc/NEWS | 4 + lisp/progmodes/eglot.el | 2 +- lisp/progmodes/hideshow.el | 1 + lisp/progmodes/lua-ts-mode.el | 457 ++++++++++++++++++ test/infra/Dockerfile.emba | 1 + test/infra/test-jobs.yml | 1 + .../lua-ts-mode-resources/indent.erts | 152 ++++++ test/lisp/progmodes/lua-ts-mode-tests.el | 32 ++ 10 files changed, 653 insertions(+), 1 deletion(-) create mode 100644 lisp/progmodes/lua-ts-mode.el create mode 100644 test/lisp/progmodes/lua-ts-mode-resources/indent.erts create mode 100644 test/lisp/progmodes/lua-ts-mode-tests.el --=20 2.38.5 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 01 16:16:06 2023 Received: (at control) by debbugs.gnu.org; 1 Sep 2023 20:16:06 +0000 Received: from localhost ([127.0.0.1]:34108 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcAYZ-0007cw-9F for submit@debbugs.gnu.org; Fri, 01 Sep 2023 16:16:06 -0400 Received: from mail-lf1-x132.google.com ([2a00:1450:4864:20::132]:60437) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcAYX-0007cj-UX for control@debbugs.gnu.org; Fri, 01 Sep 2023 16:15:50 -0400 Received: by mail-lf1-x132.google.com with SMTP id 2adb3069b0e04-500a398cda5so4248559e87.0 for ; Fri, 01 Sep 2023 13:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693599334; x=1694204134; darn=debbugs.gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=B8F27dUTyjCb2tTuDzb/erAKl5sj135vvbDJsOX8y4s=; b=jEVwoSOkSPTEwmNxVJFH8zeCxoN/PNZVWYJ44G5ZfAPbmFC7Y8e3/nEeDUsl3NALoJ 3/yRpKgFV/oV0KeobyAsAIybr1n13lGtP6djHNyQta1060/HtkGQ7kHO+GoYIEjWAEBS 6tpKMwMBGhynbllm8P+RhKo3hY4O2QnJhISbZq1UMZdOVRyGW9cqtZxxU8Cd5iiDqnsi BeBsweTNmuhS7/B+ZxuAibRnMZUKeKbZVwxHHiSOfHfix3zrkvbDNfncv76bDfflphzr nfjIE/eogHUSmXnQ2g2Iu/be9is3YhsCFFmCuWJSs2qPcq9gRguhAB3UGAtv+NzoaeWc IK/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693599334; x=1694204134; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=B8F27dUTyjCb2tTuDzb/erAKl5sj135vvbDJsOX8y4s=; b=HllyyQ7YqV9UItY+4IjaH6sKblESAvwheVWDHl6/4XyT1qntDqTu/PZtjXJThkSxak aFXZhgInP9zvyIHS+TvmLONiOD+4eKHykxUR7TQhbXUL1Vo7f9E9NR8kkldqNMxPdxw1 XMbTsHpotwTXtVEARZNY42QAXq1kkMmrw3jS130UIhHBKCu6rOHHO3OaiZUY1eJj0jen SiC7optD5zWeIjeA4sPnnE6G9lxKqXMMAd41DSFuh4eUV/XU+hbWYFRiTnnvyZ69M3v7 CMgeIPKqaULCtQA8OlwatW5NBuFQrO10YGIDImOZWf4Hbz5BPvdiXuP0fN6ksTdbVizR nq7g== X-Gm-Message-State: AOJu0Yz9a/eXTWs2Qnz7XfrVC0Z0974cO4qoaresOcn4jZVVyNU2PBwR NH//o0rKknTyFL4QQ9IG6XBttvyIfB9Qo5ihIBKmy6vg1viOGw== X-Google-Smtp-Source: AGHT+IERpJDCT4ubGpHaljdKiAtZnAVTz5K0Kj8dA+Z03g9YW/uzyCu/0DWSsmGM+XXvlopYScCX2GzR2h6WLgenrMk= X-Received: by 2002:a05:6512:15a0:b0:4ff:8729:555 with SMTP id bp32-20020a05651215a000b004ff87290555mr3112607lfb.11.1693599334307; Fri, 01 Sep 2023 13:15:34 -0700 (PDT) MIME-Version: 1.0 From: Stefan Kangas Date: Fri, 1 Sep 2023 22:15:23 +0200 Message-ID: Subject: To: control Content-Type: text/plain; charset="UTF-8" X-Spam-Score: 2.0 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: forcemerge 65672 65673 thanks Content analysis details: (2.0 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:132 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (stefankangas[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 2.0 BLANK_SUBJECT Subject is present but empty X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) forcemerge 65672 65673 thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 01 18:46:28 2023 Received: (at 65673) by debbugs.gnu.org; 1 Sep 2023 22:46:28 +0000 Received: from localhost ([127.0.0.1]:34426 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcCuK-0005Tb-Ax for submit@debbugs.gnu.org; Fri, 01 Sep 2023 18:46:28 -0400 Received: from mail-ot1-x334.google.com ([2607:f8b0:4864:20::334]:47448) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcCuH-0005TK-TD for 65673@debbugs.gnu.org; Fri, 01 Sep 2023 18:46:26 -0400 Received: by mail-ot1-x334.google.com with SMTP id 46e09a7af769-6bf01bcb1aeso1985764a34.3 for <65673@debbugs.gnu.org>; Fri, 01 Sep 2023 15:46:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693608370; x=1694213170; darn=debbugs.gnu.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=8kPQouPGTrzIuBwnX2LL94cN1KLbTirs2u9+SG5QRgM=; b=pUtEe6B2e2NMRRXMOXWtiyAZWjkE1Kfo/s+cmGbkX1SHaYQaY1ffQdB20dEWhi6BNH hWfBQ6gPjPW+dcf2PMAnJCLLpgbTml+WDiCsF80QKmxIXYhJHuPfEj6wFzM9w1uGnCI6 OozxnwwTgwwGZK0mSvbkQTNKQ19kgHKird+krhjTjOyf4UyiFQB7COyD8Wlem/nqUUYj cOpIStwqKgGo0G4tVqAqaL/h+rvEY8IGOXciV0K/ugfSVk9HcLgGGkEg4aYCSdifU6qp CC0nSWm+I6bD/nvELk0zKL5Omv3ut5k5zrAQgWuki4SFu4Mh6HF4VaKVsBPYLx8RRsMV F6Qg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693608370; x=1694213170; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=8kPQouPGTrzIuBwnX2LL94cN1KLbTirs2u9+SG5QRgM=; b=KyQTjjPOWrmw46MEijsjUKlkxHVJo2srZmiWX3gbNRI9n2oJdMNFMKH4urE8SRZU4P x7tBEa9z+N8Z/EblgLwWahzDd4cz68f6nBewvI75JrD4O5RwMKojiBmLIrPs+4QLMwIy c4caR2t7WaW6wmKiYH87A9N7FxzDrxRGRJMZI6H9jVOwLoTlBnBDEdT0w+5AKdw6kg3v 8ENQXPWQSfxUrrP8zpuVISbn1fM7QlW4B39CT6ifeUEhc9J9+qUwiW1vLumF5aRpZSUk 7A+pzk8ORgYVhGUUrY/IE48jE57K5aHumKn/F7PgbEayfTzwNOGXEemSFCl2HsyRJ4hC IHTw== X-Gm-Message-State: AOJu0Yya7sM/K6AMZryfLt9AqhgWqxVZ/1lJJox/XK0XfrQa2PAhzM5a YMoKx3i+T1VQX34DXJbT3sI= X-Google-Smtp-Source: AGHT+IE9tB4gkqnF6PmR68TuayKGfWGK6Yab1a4p7yq1rf1BRJjYrwGGthZRj1mKXVBmTfpKX82Cxw== X-Received: by 2002:a05:6830:108b:b0:6bd:bba9:2d63 with SMTP id y11-20020a056830108b00b006bdbba92d63mr4396161oto.9.1693608370494; Fri, 01 Sep 2023 15:46:10 -0700 (PDT) Received: from [192.168.0.234] ([152.168.142.156]) by smtp.gmail.com with ESMTPSA id g5-20020a9d6485000000b006b1570a7674sm2281808otl.29.2023.09.01.15.46.08 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 Sep 2023 15:46:09 -0700 (PDT) Message-ID: <28731f80-85d7-9628-a5a7-f564fe32ea78@gmail.com> Date: Fri, 1 Sep 2023 19:46:06 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: bug#65673: [PATCH emacs 0/1] Add lua-ts-mode Content-Language: en-US To: ~johnmuhl References: <169352253839.28940.16024479871485106701-0@git.sr.ht> From: Mauro Aranda In-Reply-To: <169352253839.28940.16024479871485106701-0@git.sr.ht> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 65673 Cc: 65673@debbugs.gnu.org, ~emacs/emacs-devel@lists.sr.ht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.5 (----) ~johnmuhl writes: I just have some comments/questions about the defcustoms: > +(defcustom lua-ts-indent-offset 4 > + "Number of spaces for each indentation step in `lua-ts-mode'." > + :type 'integer > + :safe 'integerp > + :group 'lua > + :version "30.1") Does :type 'natnum fit better here? > +(defcustom lua-ts-luacheck-program "luacheck" > + "Location of the Luacheck program." > + :type 'string > + :group 'lua > + :version "30.1") I think :type 'file is better. > +(defcustom inferior-lua-interpreter "lua" > + "Program to run in the inferior Lua process." > + :type 'string > + :safe 'stringp > + :group 'lua > + :version "30.1") Same as above. > +(defcustom inferior-lua-startfile "" > + "File to load into the inferior Lua process at startup." > + :type 'string > + :safe 'stringp > + :group 'lua > + :version "30.1") Same as above, but maybe the default value should be changed to nil, to indicate no startfile? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 02 08:14:48 2023 Received: (at 65673) by debbugs.gnu.org; 2 Sep 2023 12:14:49 +0000 Received: from localhost ([127.0.0.1]:35382 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcPWZ-0005Uj-Gc for submit@debbugs.gnu.org; Sat, 02 Sep 2023 08:14:48 -0400 Received: from mout01.posteo.de ([185.67.36.65]:36535) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qcPWV-0005UP-IG for 65673@debbugs.gnu.org; Sat, 02 Sep 2023 08:14:46 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id E9E57240029 for <65673@debbugs.gnu.org>; Sat, 2 Sep 2023 14:14:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1693656868; bh=8sKC9PoONH+8LEA1EkBNqQbI4NFmnclq1rECmPeofFg=; h=From:To:Cc:Subject:Autocrypt:Date:Message-ID:MIME-Version:From; b=lEfcd15lJsX9lBi77cGxNjeSFPj96TsyDm+u5UhfEG3IW8CCdL63PwrXwdksv1kJl QxZZ/1f66RlY6UP5MhXGdswhlGJNf23KpPk+YhQK4TPA7cPl1kzuIPqCvj2Cti9FA6 RJGRKzxNIWuPpMsSS0Ih2AUHca7TfNrlV67Kl9PqHxwqPMiXtdKlQWEgDzIAd7hxxG tgFS+p96ogkLOwKTZN+fO8WgO5O1vT48pnn1+mxI1OZFy20X0tdG7XmXxsZTJZgokZ EWqxEz3VrfXMoqL797k9WqiIijiIL1iEujQRNt0HAyoMLZyk/OSQkd449DLQUibOCR LkzLal4mY9kFA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RdDNL68FNz9rxH; Sat, 2 Sep 2023 14:14:26 +0200 (CEST) From: Philip Kaludercic To: ~johnmuhl Subject: Re: bug#65673: [PATCH emacs 0/1] Add lua-ts-mode In-Reply-To: <169352253839.28940.16024479871485106701-1@git.sr.ht> (johnmuhl@git.sr.ht's message of "Thu, 31 Aug 2023 16:32:06 -0500") References: <169352253839.28940.16024479871485106701-1@git.sr.ht> Autocrypt: addr=philipk@posteo.net; keydata= mDMEZBBQQhYJKwYBBAHaRw8BAQdAHJuofBrfqFh12uQu0Yi7mrl525F28eTmwUDflFNmdui0QlBo aWxpcCBLYWx1ZGVyY2ljIChnZW5lcmF0ZWQgYnkgYXV0b2NyeXB0LmVsKSA8cGhpbGlwa0Bwb3N0 ZW8ubmV0PoiWBBMWCAA+FiEEDg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwMFCQHhM4AFCwkI BwIGFQoJCAsCBBYCAwECHgECF4AACgkQ8xYDWXahwulikAEA77hloUiSrXgFkUVJhlKBpLCHUjA0 mWZ9j9w5d08+jVwBAK6c4iGP7j+/PhbkxaEKa4V3MzIl7zJkcNNjHCXmvFcEuDgEZBBQQhIKKwYB BAGXVQEFAQEHQI5NLiLRjZy3OfSt1dhCmFyn+fN/QKELUYQetiaoe+MMAwEIB4h+BBgWCAAmFiEE Dg7HY17ghYlni8XN8xYDWXahwukFAmQQUEICGwwFCQHhM4AACgkQ8xYDWXahwukm+wEA8cml4JpK NeAu65rg+auKrPOP6TP/4YWRCTIvuYDm0joBALw98AMz7/qMHvSCeU/hw9PL6u6R2EScxtpKnWof z4oM Date: Sat, 02 Sep 2023 12:14:26 +0000 Message-ID: <8734zwg4bh.fsf@posteo.net> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 65673 Cc: ~johnmuhl , ~emacs/emacs-devel@lists.sr.ht, 65673@debbugs.gnu.org, 65672@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) ~johnmuhl writes: > From: john muhl > > * test/lisp/progmodes/lua-ts-mode-tests.el: > * test/lisp/progmodes/lua-ts-mode-resources/indent.ert: > * lisp/progmodes/lua-ts-mode.el: New file. > * lisp/progmodes/eglot.el (eglot-server-programs): > * lisp/progmodes/hideshow.el (hs-special-modes-alist): > Add support for lua-ts-mode. > * admin/notes/tree-sitter/build-module/batch.sh: > * admin/notes/tree-sitter/build-module/build.sh: Add Lua grammar. > * test/infra/Dockerfile.emba: > * test/infra/test-jobs.yml: Add lua-ts-mode tests. > --- > admin/notes/tree-sitter/build-module/batch.sh | 1 + > admin/notes/tree-sitter/build-module/build.sh | 3 + > etc/NEWS | 4 + > lisp/progmodes/eglot.el | 2 +- > lisp/progmodes/hideshow.el | 1 + > lisp/progmodes/lua-ts-mode.el | 457 ++++++++++++++++++ > test/infra/Dockerfile.emba | 1 + > test/infra/test-jobs.yml | 1 + > .../lua-ts-mode-resources/indent.erts | 152 ++++++ > test/lisp/progmodes/lua-ts-mode-tests.el | 32 ++ > 10 files changed, 653 insertions(+), 1 deletion(-) > create mode 100644 lisp/progmodes/lua-ts-mode.el > create mode 100644 test/lisp/progmodes/lua-ts-mode-resources/indent.erts > create mode 100644 test/lisp/progmodes/lua-ts-mode-tests.el > > diff --git a/admin/notes/tree-sitter/build-module/batch.sh b/admin/notes/tree-sitter/build-module/batch.sh > index 1d4076564dc..685a35c269d 100755 > --- a/admin/notes/tree-sitter/build-module/batch.sh > +++ b/admin/notes/tree-sitter/build-module/batch.sh > @@ -15,6 +15,7 @@ languages=( > 'html' > 'javascript' > 'json' > + 'lua' > 'python' > 'rust' > 'toml' > diff --git a/admin/notes/tree-sitter/build-module/build.sh b/admin/notes/tree-sitter/build-module/build.sh > index 0832875168b..969187b7f92 100755 > --- a/admin/notes/tree-sitter/build-module/build.sh > +++ b/admin/notes/tree-sitter/build-module/build.sh > @@ -42,6 +42,9 @@ case "${lang}" in > "heex") > org="phoenixframework" > ;; > + "lua") > + org="MunifTanjim" > + ;; > "typescript") > sourcedir="tree-sitter-typescript/typescript/src" > grammardir="tree-sitter-typescript/typescript" > diff --git a/etc/NEWS b/etc/NEWS > index 9a98db8c83a..1a40a62615b 100644 > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -730,6 +730,10 @@ A major mode based on the tree-sitter library for editing HEEx files. > A major mode based on the tree-sitter library for editing Elixir > files. > > +--- > +*** New major mode 'lua-ts-mode'. > +A major mode based on the tree-sitter library for editing Lua files. > + > --- > ** The highly accessible Modus themes collection has eight items. > The 'modus-operandi' and 'modus-vivendi' are the main themes that have > diff --git a/lisp/progmodes/eglot.el b/lisp/progmodes/eglot.el > index 65daa0941d5..f249e3c81b4 100644 > --- a/lisp/progmodes/eglot.el > +++ b/lisp/progmodes/eglot.el > @@ -237,7 +237,7 @@ chosen (interactively or automatically)." > (gdscript-mode . ("localhost" 6008)) > ((fortran-mode f90-mode) . ("fortls")) > (futhark-mode . ("futhark" "lsp")) > - (lua-mode . ,(eglot-alternatives > + ((lua-mode lua-ts-mode) . ,(eglot-alternatives > '("lua-language-server" "lua-lsp"))) > (zig-mode . ("zls")) > ((css-mode css-ts-mode) > diff --git a/lisp/progmodes/hideshow.el b/lisp/progmodes/hideshow.el > index b878986d7a4..78e39fad740 100644 > --- a/lisp/progmodes/hideshow.el > +++ b/lisp/progmodes/hideshow.el > @@ -264,6 +264,7 @@ This has effect only if `search-invisible' is set to `open'." > (java-ts-mode "{" "}" "/[*/]" nil nil) > (js-mode "{" "}" "/[*/]" nil) > (js-ts-mode "{" "}" "/[*/]" nil) > + (lua-ts-mode "{\\|\\[\\[" "}\\|\\]\\]" "--" nil) > (mhtml-mode "{\\|<[^/>]*?" "}\\|]*[^/]>" "