From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuan Fu Newsgroups: gmane.emacs.devel Subject: Re: c-ts-mode Date: Thu, 31 Aug 2023 21:14:42 -0700 Message-ID: <5F73CB5D-DB00-439F-AD7C-7E209EC83A35@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.700.6\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40875"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Sep 01 06:15:54 2023 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 1qbvZa-000APc-Kh for ged-emacs-devel@m.gmane-mx.org; Fri, 01 Sep 2023 06:15:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qbvYl-0008Sl-I4; Fri, 01 Sep 2023 00:15:03 -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 1qbvYi-0008S4-5D for emacs-devel@gnu.org; Fri, 01 Sep 2023 00:15:01 -0400 Original-Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qbvYg-00076j-00 for emacs-devel@gnu.org; Fri, 01 Sep 2023 00:14:59 -0400 Original-Received: by mail-pg1-x534.google.com with SMTP id 41be03b00d2f7-5654051b27fso1133970a12.0 for ; Thu, 31 Aug 2023 21:14:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693541695; x=1694146495; darn=gnu.org; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=XxG/ITFGOc3nMR2eJxDO8F/hTfqM9j8/JiJRnU8u3yw=; b=TTl5/c9VU+ck3x0mTBENraj9YGm6+O9k4y+bodW0T2LbPfm0Mri6sADZ+xRGmRJKK+ qznMSqz4GmEoC5nDb5VuEZ/YfWxv+Pqyab7bVAfg391kXYSTu8QCkDS74Mo3zlsGEJ1P JiVJhHAKbfZQpFJcqala/7Y3UxXzZ89K5O9pSKyPQr7G4R+QOgJ04Vq3K1ftm5air94v sBcGOYg/NONIDJH1LkS3KL2RUhh7RbvehOu8xbjUVZf6zeKFBFjiOj8yMK4LoY7zyLJk oqfgdMcYAiOdaj6iuU6d7AhM19ptfy4KA2REckEphj+oByy9KwnHqtOXbupWIMLXsH9J t5SQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693541695; x=1694146495; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XxG/ITFGOc3nMR2eJxDO8F/hTfqM9j8/JiJRnU8u3yw=; b=YATj/QFHIzvrEHuBkdBuoF7WxxOIEk3WKnLYN/XgAPaMZLYTQXIVhOmRfh4OfVrvK5 xKJLoSQtZXF4jIw/7oHhXoeeoVOAyoCVaC7Xrz3QHhX3ZapZMF6ZAwHg0p3RtKZBrqiS ukgABBdHWnTCMB0GnCo6UgsQ9kpmAGOzOMN9uNXoLQbb9O4K9TqxYHUTBuwnW7gqsBZ8 i8bNT4CeORfrCVD9qHNy30tVJyM7wRZzCYEvDTIi7qew54eSDfQNxTnMhILp3i6lFSjD xyZ3RW6juEPablYju0ihr+mmjDgtF2d35mWXO3dQgGl8/2C/0eQwOJSL571KAp670Vxx gk1w== X-Gm-Message-State: AOJu0YxzyCc4/24DPaGB7/tpq2zutrqb50+H1ErqTuszbkN6gQyk+gG9 psq+DrNZRCXHVe3LD+zlCvg= X-Google-Smtp-Source: AGHT+IFnTxOM63lhEik/6U/9jsgjTF5FfXG6kwp+viD5yvp2W3nMWHwwFTjQ4D2pYZijiqGFrQDPuw== X-Received: by 2002:a05:6a20:244a:b0:140:3554:3f41 with SMTP id t10-20020a056a20244a00b0014035543f41mr2144184pzc.54.1693541694782; Thu, 31 Aug 2023 21:14:54 -0700 (PDT) Original-Received: from smtpclient.apple (cpe-172-117-161-177.socal.res.rr.com. [172.117.161.177]) by smtp.gmail.com with ESMTPSA id c5-20020aa781c5000000b0068a3dd6c1dasm2072882pfn.142.2023.08.31.21.14.53 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 31 Aug 2023 21:14:54 -0700 (PDT) In-Reply-To: X-Mailer: Apple Mail (2.3731.700.6) Received-SPF: pass client-ip=2607:f8b0:4864:20::534; envelope-from=casouri@gmail.com; helo=mail-pg1-x534.google.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, 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:309716 Archived-At: > On Aug 30, 2023, at 4:52 PM, Ergus wrote: >=20 > Hi all: >=20 > I have been trying to use c++-ts-mode and I found this apparently = wrong > indentation: >=20 > int a(in x > ) >=20 > The ) is placed differently compared with the previous c++-mode and > inconsistent with the current linux coding standard. >=20 > The treesit-check-indent shows actually a diff there (same with for > loops) >=20 > I see this entry `((node-is ")") parent 1)` in = c-ts-mode--indent-styles > so there must e a reason I am not aware of... however: >=20 > Is it possible to specify small differences in the existent styles = like > we used to do with c-set-offset? either in the init file or the > .dir-locals.el? >=20 > a way to put something like: `((node-is ")") parent 0`?? >=20 > If I need to define some completely different indentation style = (google > for example) whats the intended method to do it without reinventing = the > wheel? For now at least, I think you can try modifying = treesit-simple-indent-rules. You can prepend rules to the list which = would take precedence over the rest. C-ts-mode could definitely be improved in terms of customization, and = any feature in general. Any help is welcome! Yuan=