From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Theodor Thornhill via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#60025: [PATCH] Add go-ts-mode and go-mod-ts-mode Date: Thu, 15 Dec 2022 20:59:12 +0100 Message-ID: <87y1r8zbe7.fsf@thornhill.no> References: <5HEX4A0JH8fd_VGG1FbzJ8QtBZXlHLKtuAGgc_TUHvzKCzU2Q3PYbbi3rUWeLOBoJzg0qsQgVhwGZCF86A2Xg--I2ep5d1KjKoUoHrxXpqA=@rjt.dev> <87zgbpznfa.fsf@thornhill.no> <7fPZo7wRGoWPnr5djOSL0gsOE-Q15-l2y-INvJ7z5QXOpXmV_ct4soqgJTYtHZ6EReO3ROGRS_VYnKkYNH6j1CghKfMbRXMmanEB-eaANjk=@rjt.dev> <87y1r9w2sx.fsf@thornhill.no> Reply-To: Theodor Thornhill Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32963"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Yuan Fu , Eli Zaretskii , 60025@debbugs.gnu.org To: Randy Taylor Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 15 21:00:15 2022 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 1p5uOt-0008NE-7x for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 15 Dec 2022 21:00:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1p5uOj-0001jy-5Z; Thu, 15 Dec 2022 15:00:05 -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 1p5uOh-0001jZ-5D for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 15:00:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5uOg-0001qm-Qh for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 15:00:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1p5uOg-00030s-Dk for bug-gnu-emacs@gnu.org; Thu, 15 Dec 2022 15:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Theodor Thornhill Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 20:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60025 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 60025-submit@debbugs.gnu.org id=B60025.167113435911538 (code B ref 60025); Thu, 15 Dec 2022 20:00:02 +0000 Original-Received: (at 60025) by debbugs.gnu.org; 15 Dec 2022 19:59:19 +0000 Original-Received: from localhost ([127.0.0.1]:44612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5uNz-000302-6r for submit@debbugs.gnu.org; Thu, 15 Dec 2022 14:59:19 -0500 Original-Received: from out2.migadu.com ([188.165.223.204]:25007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5uNw-0002zw-Dw for 60025@debbugs.gnu.org; Thu, 15 Dec 2022 14:59:17 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=thornhill.no; s=key1; t=1671134354; 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: in-reply-to:in-reply-to:references:references; bh=iEkKTxKBqjhl1oTeKi+R/lRoeFUARgKr0lsWTN9fHG8=; b=xQU+YsM7uxNKFABNOmKlk3uNe9/u6qzMzObeNNDdygl939LTvRzXPaYbNIPODe8ye02Kr1 tjJemZJbwuOhZ+f2QetxgEvLPPSdfkuFxo6XvauyQYgv8Pj2wL9ld4COOLD9yUK8jVJ8R3 14CK348wf7723ydWO3zHNGoIq9O1EhmjIKGBWNS4Buy04rVbbdoZZqZQ6vVKxd8DNkipM4 5HSf3gGYoX07GXNYIA7r+aAaeNmswoSqDKv+LJyO8b04nvVx2LJN8xuQnXTMrazwui4Sww ISgMiNdGL7Hr++7PHl0k+XLwwqVCAPc/I48lyBukhKxtUCB0LgnLAVi0lBZ6oA== In-Reply-To: X-Migadu-Flow: FLOW_OUT 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:251145 Archived-At: Randy Taylor writes: > On Thursday, December 15th, 2022 at 13:06, Theodor Thornhill wrote: >> >> On 15 December 2022 17:40:54 CET, Randy Taylor dev@rjt.dev wrote: >> >> > Which rules should I add? >> >> >> I like to set no-indent in a comment so that indentation commands don't format. That should be fillings job, imo :) > > I don't know if I agree with that since the indentation commands should format comments if they are formatted incorrectly. > > Fillings as in auto-fill-mode and the fill commands? I'm not familiar with those, beyond invoking fill-region and whatnot every now and then. I don't think any of that stuff is on by default though, right? It all requires manual invocation? > >> >> > I see these rules in some of the ts modes: >> > ((and (parent-is "comment") comment-end) comment-start -1) >> > ((parent-is "comment") comment-start-skip 0) >> > >> > What are they matching? When could a comment be a parent? >> >> >> In some languages comment has a parent which is a comment. Just use inspect-mode inside of a comment and see what makes sense :) > > c-ts-mode has those queries and I was never able to get a comment node as a parent so I guess they were either copy-pasted mistakenly or I am missing the magical invocation? > > Aside from the aforementioned queries, I don't see any other comment-related indentation queries in any of the modes, and I can't think of any that should be introduced, at least for these modes. > > Patch OK to install otherwise? Sure :-) Theo