From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill Newsgroups: gmane.emacs.devel Subject: Re: Tree sitter support for C-like languages Date: Sat, 12 Nov 2022 07:37:00 +0100 Message-ID: <009F18E4-F820-44F9-A752-492E9135CB7B@thornhill.no> References: <87tu36em9t.fsf@thornhill.no> <45FD2F78-F15B-488B-9348-A8E298D8AD35@gmail.com> <87v8nmyqqp.fsf@thornhill.no> <8464849C-0F41-40DE-8B7D-08CF37320362@thornhill.no> <6C490C09-E6DF-49F8-9B05-3E4B2DF377EC@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31069"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Yuan Fu Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Nov 12 07:38:16 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 1otk9f-0007r7-Jd for ged-emacs-devel@m.gmane-mx.org; Sat, 12 Nov 2022 07:38:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1otk95-0006Qo-PV; Sat, 12 Nov 2022 01:37:39 -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 1otk94-0006Qd-AB for emacs-devel@gnu.org; Sat, 12 Nov 2022 01:37:38 -0500 Original-Received: from out2.migadu.com ([2001:41d0:2:aacc::]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1otk91-0006CK-TK for emacs-devel@gnu.org; Sat, 12 Nov 2022 01:37:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1668235053; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wBUNPQKxP46Ttj2smfXtdqRRT69S4aDJTsq/Pkroho4=; b=lmSJ3T516Gs7mkS+Lby1wt/NdeejoYJcVg1T4ThDkq3KFfeVjuB8A9xm+6W82G+66KQmD/ rgivWLg/Ixo3hUbhJbgi8aOv25v+dR615JdC3OFFgEB/bJLwGpiwmNEFhEGVB9Rc6qLAt9 yNPjlhjd1DlnnIHalqwqhLX38Qgs+I6qvXkIPDu4d3akI0OB5wbAuC3IPKZh4Y+in3CPun apUROLUhpjsDpmYvhAleklLHh8YDyifkA+YLXx1zpt8tA5lQL7z+AV3ShSuX789I92SiAH tv8D0uEAFrP1pLMAm+FR77188AtW8Uf/g3TKatvG16nzKnskdHsn+MBYeqSKnA== X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. In-Reply-To: <6C490C09-E6DF-49F8-9B05-3E4B2DF377EC@gmail.com> X-Migadu-Flow: FLOW_OUT Received-SPF: pass client-ip=2001:41d0:2:aacc::; envelope-from=theo@thornhill.no; helo=out2.migadu.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:299613 Archived-At: On 12 November 2022 07:25:13 CET, Yuan Fu wrote: >>>=20 >>> I noticed that with the default indent style, Emacs indents like this: >>>=20 >>> int main () { >>> for (int j =3D 0; j < 5; j++) >>> a[j] =3D 3; >>> int i =3D 1; >>> swap(i, a[i+1]); >>> Point p =3D {0, 1}; >>> } >>>=20 >>> int main () >>> { >>> for (int j =3D 0; j < 5; j++) >>> a[j] =3D 3; >>> int i =3D 1; >>> swap(i, a[i+1]); >>> Point p =3D {0, 1}; >>> } >>>=20 >>> Is this expected? >>>=20 >>> Yuan >>=20 >> The first one isn't gnu style, right? But it's an easy fix :) > >Thanks=2E It isn=E2=80=99t gnu style, but it would be nice if the first s= nippet still indents normally=2E (So that I don=E2=80=99t need to set the i= ndent style for different projects=2E) > >Yuan > I agree! I'll fix it :)