From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Felix Newsgroups: gmane.emacs.devel Subject: Re: Tree-sitter doc question Date: Thu, 08 Dec 2022 16:08:39 +0100 Message-ID: <87tu26rklo.fsf@web.de> References: <20221208141247.36l2j3bxggslsykl.ref@Ergus> <20221208141247.36l2j3bxggslsykl@Ergus> <83a63y2c6m.fsf@gnu.org> <20221208145246.3iq7ehnxdii5xgqq@Ergus> <835yem2bal.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1331"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.9.3; emacs 30.0.50 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Dec 08 16:21:06 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 1p3Ihu-00005Y-Aw for ged-emacs-devel@m.gmane-mx.org; Thu, 08 Dec 2022 16:21:06 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p3IhD-0008DP-K4; Thu, 08 Dec 2022 10:20:23 -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 1p3IhA-0008D5-27 for emacs-devel@gnu.org; Thu, 08 Dec 2022 10:20:20 -0500 Original-Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p3Ih8-0004fj-C7 for emacs-devel@gnu.org; Thu, 08 Dec 2022 10:20:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1670512797; bh=lXUL1Fjt01r9H3lSowbtQ5j52cMFm/3+bMQLSEqObQI=; h=X-UI-Sender-Class:References:From:To:Subject:Date:In-reply-to; b=XPBOdHdcPm25r03DRBd7u9T3OT508qDt8xE5XRV06zc53Tje4U0/imjZ7IymrkU1H nzQ6MNlJ/VdlVTXrjrwFjWrYU4W3tp5eVbBehbPgHKDTbsM3kAjjfkYBxndy8WfmgE hCzPW2R1uWB9E4ld4GNLSQIBYT7iToOnQaUPKnsdfERbUfHPEl6BCLD7P1e7ig4GTb iNfTbUvbbuF5BPzEmqOMBX+VktJAioq79bvB9UEORcl+34EKtjFrmySekV8ZQJNNXM YGazP5qwYeS7dnbW4lg5oMIlQgvw9XsgjW1XF2afO0ZkYA7hDORXK3sn/AEMTUOIvU NUTaeUErsEjUA== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Original-Received: from felix-lifebooka531.web.de ([91.5.227.111]) by smtp.web.de (mrweb106 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MyvBA-1ogydz2n8k-00w4mu for ; Thu, 08 Dec 2022 16:19:57 +0100 In-reply-to: <835yem2bal.fsf@gnu.org> X-Provags-ID: V03:K1:HOA0+zKuWhxub5W5f+D2Ua7s+hNzMX23wXp3B5/ReGCOcwSMf8i z98+GkJ+4vCc8HjbJVd/Zqvrwepa/40ayGRBrn8hp63jTvLL4kkgmBhgThdMHv5btEFk0Sk a44qFECmiRIL57aH1ZPP5bmvHZJA7Qt/F71hw7W4J+B5xImiZnkbhmXeMAQkBrTl2uDgNAZ TsaNbqu4GxvzpVoFS2k1Q== UI-OutboundReport: notjunk:1;M01:P0:cEwF7LdnY3o=;N4gAkbanJEo8r0hBsIMX0f2Oey4 rFRsxRkPa8vB4JZoXGNUB99w/3L1GeHuNq15RJO9yv8PTrdxqOjEsbgFk6ORFoIbKtH+F+JTb LqU7F4zHKCvjDi3J2aqNjEpJSPzsaHeRyOuJfRm646y1KCXzEx3x1L4srIjgYSR5J7hgSx2IC LbwUqyTFWfZl0Z6bD5up44aFAyC7q0bG08LkeD9BF+Obv6TLI1sqOFaD+no2auXdgOBvQuN0z 2/i0PBwvV7cJYweq5QPbyAymadXzuRi8ajYe3VKNbO+7HwwbzRIpSd+iHpZeCEm+SfREh7Q7i hORGRJEl7yd7LPX3A6wyMmBylQ3Ibt5VyWclIiyLeaStZ41xSzh8BUxR7xg5nWA3ocw2Y7joc coLDLCiSQ/p721JYk1COLTvXicVvA6Ht3A5+ywMPexAsKEInFyOmF+p99KASq41lPmrD2+7m6 OCOnXXMhqDqR9u+gQxnhj97V3Do3XG+6XAriirsUZ94fAp1Q1cDAi3EaVvzXLhXwM9HTf2ZXf Ub9qzik0X8qrESyVpuEpWss1EoJnre0r1bjTlq2npmWqyMYuUpe+/+syR0mv2zntM7nQabXw6 l6oTVR7pzqAa/fi/1AXV+SOsaBMcA9GgXh7/GROtGohR+pwTi1tVIGvf6kjsj/tQO5jeyVAcI rn3gJttNpdufbrT0GF2hdIG3E8JZLufaRkfoFuVs7Qy3j4RQJbJCEjbVSxLbs2GajUcHqoEpn u4IB4OPQmMWNs77Xv9LG11HhlL5ckmtVTYi3474RssCsWkcC4i4/drhLw3d8PJEKU85dNNWx Received-SPF: pass client-ip=212.227.17.12; envelope-from=felix.dick@web.de; helo=mout.web.de 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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham 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:301041 Archived-At: Eli Zaretskii writes: >> Date: Thu, 8 Dec 2022 15:52:46 +0100 >> From: Ergus >> >> >The modes that rely on it know how to check that. >> > >> Yes, but as I was trying to use it in C I didn't know if it was actually >> working or not as I don't see any change. > > You need to turn on c-ts-mode manually, it is an opt-in feature (and > will probably remain like that in Emacs 29). > >> >The colors are our faces, so the answer is "neither". >> > >> I know; maybe I needed to be more specific. As I don't know if it is >> working I don't know who was setting the syntax info. > > The faces are set based on the results of parsing by the tree-sitter > library. What would be the recommended way to enable the *-ts-mode for a certain language? Adding a hook to a major-mode to enable another major-mode seems a bit backward. This is what i did first, now i added entries to auto-mode-alist. It would be nice to have an customization variable that controls which major-modes are replaced. For more user feedback, it would be beneficial to have an easy way to enable and try tree-sitter.