bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#60025: [PATCH] Add go-ts-mode and go-mod-ts-mode


From: Randy Taylor
Subject: bug#60025: [PATCH] Add go-ts-mode and go-mod-ts-mode
Date: Thu, 15 Dec 2022 19:45:45 +0000

On Thursday, December 15th, 2022 at 13:06, Theodor Thornhill 
<theo@thornhill.no> 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?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]