From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#72388: 31.0.50; Use tree-sitter-cuda grammar but with tree-sitter-cpp's font-lock/indentation rules Date: Tue, 13 Aug 2024 01:10:57 +0200 Message-ID: References: Reply-To: Ergus Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5871"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu To: 72388@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Aug 13 01:11:46 2024 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 1sdeCY-0001Po-6a for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 13 Aug 2024 01:11:46 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdeCJ-0007yC-NP; Mon, 12 Aug 2024 19:11:31 -0400 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 1sdeCH-0007y1-JS for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2024 19:11:29 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdeCH-0002ws-A3 for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2024 19:11:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:MIME-Version:From:Date:To:In-Reply-To:Subject; bh=x9v5V/5F3IcJd/YM5ENwXg72Odqh9sTG/i4rtpsgBHQ=; b=c7W9HhRW23hxtm+23MIDX1RRXr14JW+ALZEypGms9f1Jrv34lKFZG4PaelPHxydady5gCJIq0D3MxUwrm9jSAzhwz2AXGagUw/lyKKs84cRWmlrg2l+E0tUZc6gpOwc97yfZENAegYc0EiZ62AZSduSeTMQW7H8ZjRLE7cjjO+I0DzP7KNw73BGVn23jrYRn2iYjnLUEvZEcGm6s/oPwilLrk+kjfL0NbT7R+4zWUYsn8JbMZOKIEa1Hl/LRXEuTzBwTA5ajgUCvtkLJWiro1G5zF/VbN8VGlxQRwQDGCuLViYf70ln2skJh02v3c1hHvxmthJUV6qwimzbQ8/0BAA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sdeCn-0007mX-R4 for bug-gnu-emacs@gnu.org; Mon, 12 Aug 2024 19:12:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <4138B715-7C8D-4904-8D0A-616BA556AD4C@gmail.com> Resent-From: Ergus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 12 Aug 2024 23:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72388 X-GNU-PR-Package: emacs Original-Received: via spool by 72388-submit@debbugs.gnu.org id=B72388.172350430629878 (code B ref 72388); Mon, 12 Aug 2024 23:12:01 +0000 Original-Received: (at 72388) by debbugs.gnu.org; 12 Aug 2024 23:11:46 +0000 Original-Received: from localhost ([127.0.0.1]:43929 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdeCY-0007lp-8F for submit@debbugs.gnu.org; Mon, 12 Aug 2024 19:11:46 -0400 Original-Received: from sonic305-3.consmr.mail.bf2.yahoo.com ([74.6.133.42]:34262) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sdeCU-0007lR-M0 for 72388@debbugs.gnu.org; Mon, 12 Aug 2024 19:11:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1723504263; bh=x9v5V/5F3IcJd/YM5ENwXg72Odqh9sTG/i4rtpsgBHQ=; h=Date:From:To:Cc:Subject:References:From:Subject:Reply-To; b=fgrMuPF3bitMvPHAMccZi9VbcE/+x2QiAcBQ/H9jWphIv0BDl8nYzr2HForGtku3uKpKqHRwPtew8WP0qct8NYDzt9mhg6HbIRUZEQTocxIUgtA9L+Cqx7sjxkHxxAzcMqn/mM0Hyc283QblvTXnwYzLYQcF9xdwd+bPKk7eoraU6LaYb7/L7zPEA2w7RiUVxqRHa+6iZGgucLsuKDugJ+1Hhz5kJ/wnV7YE3CI6ibAcdYi6as8OW9JO/SbJG9bg/JWFBn4gIL82GDgiWlsOaSqFwbazN1ANJm94vOadpuvE6sZjaYd5jxcmNQh7TVdW+ZQwzLe3/AxVyvalNTFxWg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1723504263; bh=2JudAyeueYnyj1H7tR+xYTQZRgUrLJh7ZfCoLXpPw9+=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=uk1TbxdI8/dLtz/iRLPT2gDsArlLzxXVCzOuHBGPyw2DqeNkMMagsuMF/agMbfHHYEdgA8RMhNQ4SZyQb4YTM5zwGyvZYJS0/HvLttYWKC9elc+5Mv4WUcFr1CbhoIYPZXa0GrwdIlKSq6yivX+k4jPh9yFdtW9s3JiKFf9ydSq2dcMcqvQsXEs1BXm1oJUq+PtH8yHiYrxadItW1mGiWCqd9dEglF4wT/7rP+2zQRlGQ+H0FUDNsvsv/yjyf9f/e5q8hRF9OFXp21kaysR6XJYDHXt5Q7+ypYYzf22P1sW2hWWwoMc4HvgJX13/b/lp0+fEj3yLABlFBZkO35+qpA== X-YMail-OSG: .vjm5.kVM1lutivWHPyej_eg4SWryZcmgTBED_DE6kmR2BGkRVq9gJq56CwJEmf lXX4S9VkmlYKuQNx8btMKQ6f.V6U2YxWZMRNRDU0CDYb8GhRQn6LK92sTX2IlXYzBr5Qr8.bR3A0 D5vuTBqkxJpO3R9wK5iIXanpOerwHrDoaYfcZCxomj3ApacFuvz9WPe9Y55F7EtgwPKS22dM8bt4 hPS4EkN.mtxrnCsmaERg9VAHtXP_AUN3b258PviBpLVBBNlPI86_GLxOJsoU.mR9lICmtQI4Dicf 2bqnB6aubdtBb5lJKX7cKEo5N1L69Y5CjifVHMLjbrUpHd8df5tVA1VNBu85cPaXAW7CUZ52Uxeb V5NRJGape.ualF30kbSUHGiIZgQvrvTDU1QHp1nZHYMVDO7Bgoi9ETsCoQczUFIqBPiNhlJUinIY z1cy7.n7SS1D6hKl.CgC_naMs4qV2dKrxT6_NuvPb_EucM8b7FEZLOqckH5ethRSk6FKAyeZ0hY1 XiE3eUoFmxP90k.khbzVwMG49jiaoiuNWT.gT6MuTZtD0IDXiEYTDFGudloqp07josqjDaIL6qGb 3Oj0cy.nd6jdTyS4Z5XBkEme6f2Kx0ytZjfuwjhDL4DsBUBgwcOPBtSW35v6vmsohzkJjqNOjPYS nTqC4CYMYjIf1.nNAvHbNjKVvdwJjfSaR6vy06CkA7.ki8QTRhpyF0WCYmce5gqsxtH8abKwNQxF wUw7yd0ZWrp06WURcXy7r5Q6gxQtl158y0eZvzJrhNcrrP.8O8EeQUROGzNBAFVL2qbfjlHUy09D KFt4KxSPFifwZ9D6LUlvyCmXiqVaCNOVC3KJAlpzOq X-Sonic-MF: X-Sonic-ID: 5120933f-20a0-47e7-9a11-07763b30fe12 Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.bf2.yahoo.com with HTTP; Mon, 12 Aug 2024 23:11:03 +0000 Original-Received: by hermes--production-ir2-6664f499fc-lsbf5 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 0088df222f9faeaba22526d8a9a056e3; Mon, 12 Aug 2024 23:10:59 +0000 (UTC) Content-Disposition: inline X-Mailer: WebService/1.1.22544 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol 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:290061 Archived-At: Hi Yuan: I am just trying to use the new treesit-language-remap-alist and so far I understand your idea of how to make it work for the basics. But it is not clear how can I use the new var to add the new syntax entries. I mean, looking at the grammar: https://github.com/tree-sitter-grammars/tree-sitter-cuda/blob/master/grammar.js You can see that it is the inherited C++ syntax, with extra entries in some fields (like _declaration_modifiers or delete_expression). For this part the new variable may work perfectly. However there are a few "new" entries like: kernel_call_expression, kernel_call_syntax and launch_bounds that will need special handling. What's your suggestion? I mean, for the latest what we really need is to extend (partially redefine) the c-ts-mode--indent-styles, c-ts-mode--keywords and so on. Is that the intended approach? Best, Ergus