From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Po Lu Newsgroups: gmane.emacs.devel Subject: Re: TypeScript support for tree-sitter (was Re: Call for volunteers: add tree-sitter support to major modes) Date: Tue, 11 Oct 2022 16:25:06 +0800 Message-ID: <877d16ix7h.fsf@yahoo.com> References: <83czb1jrm3.fsf@gnu.org> <87h70b8zqs.fsf@thornhill.no> <835ygrhd1p.fsf@gnu.org> <87bkqj8w8n.fsf@thornhill.no> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31782"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.91 (gnu/linux) Cc: Theodor Thornhill , Eli Zaretskii , emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 11 10:57:46 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 1oiB57-00089F-Co for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 10:57:45 +0200 Original-Received: from localhost ([::1]:60642 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiB55-00039x-WF for ged-emacs-devel@m.gmane-mx.org; Tue, 11 Oct 2022 04:57:44 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45982) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiAa0-0002Ih-Oy for emacs-devel@gnu.org; Tue, 11 Oct 2022 04:25:36 -0400 Original-Received: from sonic305-20.consmr.mail.ne1.yahoo.com ([66.163.185.146]:41280) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiAZw-0004ww-IL for emacs-devel@gnu.org; Tue, 11 Oct 2022 04:25:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665476717; bh=DpdcGewLHusHVsJILGSlGKj1nTntN1+9yScOP5SSLUQ=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From:Subject:Reply-To; b=Q2pdsZiFQSuJkbQE86nghIX5mH26GeEhj4aAZrY+YsQ2ngog5HLAshCtQHOanDdCBh3ifuhr007KKuRQ9folarC4IZ+eb35qPPfToJ8R903ke2of3igdZK1J+NwROeMzKKGowTieSUXU2pXzucOgm//BG0c8Achno7T0CS+5QKPKtrWe644RBHzWnd5wKTiAXgMO62/RSdynDnhtKEEX5hWfRTjhXQdjs8T/YmgwdQaF0GW0fSBXBs4Oi3cIq7SpJJ0gCHh/DkGWTNcFRRHgOsSQFDnH21ncyA2NeONqKgc2mgEolpGdGb3KFP3xsOtwVSyvgl+CeiAvmB+DfLS/dA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1665476717; bh=W7r1sR/u1mlfSIOuqVwjCDoA6RIvyw256W11BI4h4wH=; h=X-Sonic-MF:From:To:Subject:Date:From:Subject; b=UqeKX6J6cduh3GMxDE6TigZho3YsxQNZQdsyx/mGtm19wdh6Tzx0IIzNQPVmAQ1tmjQ51N2jzAWC81Lw7lC4PJTEsdemnmOw8IHNUOoWJQrdrH6gbbd/yc/ZjzrwvIP297hma+Fxx0Ge7f6GOwxGNKcyqkpQH4K03e8Jnk9PAvE/PgF0t8JxsMPUI6UHpWqEL2H9dWLbY7FQXN+iiJmgCFmeFkiqx5itzfR10zUANh2vNpLlRK6pzQwsoZ4aWMG4Yj87gMmOFTHKsPoBPrwgvS6QxVwr4mCSRzJ74GGc6GAVZvKgz1TmwYYHLTJg2g0X/2j/eAIYvE1WYmVE4u09yg== X-YMail-OSG: 8JYlGiwVM1kF2aLZcj9oNH9bwxV7mbzgFLC6wh9nD3nK9JWlF8FSQE8MOHBySah IdClEfDsEqUXPHFTR9rkOCmp4jiHQZHsW8u91nJaTObFZn6IrX3Sgt85rw8QwFrKsUWNMxmUDwjt h493RVLgAD8OnzFwTPnu3SXcCXcIL9jt09K.InCMlF7D2K_WnEOrJJZV1KP7Tc7ATzf5UPsdRl.Y vQk9wFVTG_Ex5l9O.aNJ1Kjbatcsour5R2hvzyOxQYjQGWGiAWF8TGHA8fd1v16EOONLwDCEYBxv 2UK7LvwQTrrbP1EZjcbGqJAWyYRx3jkkLLF9AAAgR8uU7owEqWAv3YzqnpniRhCEj.F7lVOnSAnp cAs8GRCDEnLWWCdiSfNWzPg0Qenjw2UaqlJSNXdGH3zNM7mNMViWZIkwcaNz5QX8l34QuThJRnbZ t2ybCTWIAePNYvp7T07EVYUaAA9iuptvMQmjXsVpTre6Ip.mKg6OHFf0xmuvwZF7HfmCbr9.nPkI zofbvpDec1nvNWvgL84ZQuhh8WVvWItEBpB7Md5mZJ9Bm.eBvbUoE36EANMEyBmqfBsWVPEJrvbQ 4RMIz7Re.Gz38eOt.b0E8qvGKqUO5aInLQ6wNZ.XQzsmqgF4jXA82ED1UL6jhk5QYFPJz1ib4Hve 8i2uRHB5eT9g4HWvhDE03bX54DVQyQ.tjVl851KG7j7jBUm7vCEg_82n7Wuh0fzrGnRZEscwvW1w .NpDnYBbE4x3sB1QPBNg9Pmw3oXBnXflFqFy5LOQQr.sg8xq5jPKbJmN6ou8rS0A_HHkBQbHykvM 7FfU9Ft5WMnkWaCgmEBzJeVBdf3ln0bR9ZUi.StOQC X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic305.consmr.mail.ne1.yahoo.com with HTTP; Tue, 11 Oct 2022 08:25:17 +0000 Original-Received: by hermes--production-sg3-785466d859-9ltwm (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 17683e38ab766c88f7237edef9d24b28; Tue, 11 Oct 2022 08:25:13 +0000 (UTC) In-Reply-To: (Yuan Fu's message of "Mon, 10 Oct 2022 10:07:07 -0700") X-Mailer: WebService/1.1.20740 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo Received-SPF: pass client-ip=66.163.185.146; envelope-from=luangruo@yahoo.com; helo=sonic305-20.consmr.mail.ne1.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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:297458 Archived-At: Yuan Fu writes: > +(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-mode)) > + > +;;;###autoload > +(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)) > + > +(define-derived-mode typescript-mode prog-mode "TypeScript" > + "Major mode for editing typescript." > + :group 'typescript > + :syntax-table typescript-mode--syntax-table > + > + (unless (or (treesit-can-enable-p) > + (treesit-language-available-p 'tsx)) > + (error "Tree sitter for TypeScript isn't available.")) So editing TypeScript source code will cause an error to be signalled when tree-sitter is not available?