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

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

bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to fu


From: Randy Taylor
Subject: bug#60805: [PATCH] Extend go-ts-mode with command to add docstring to function
Date: Sat, 21 Jan 2023 03:30:40 +0000

On Friday, January 20th, 2023 at 15:39, Theodor Thornhill via "Bug reports for 
GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org> wrote:
> 
> Evgeni Kolev evgenysw@gmail.com writes:
> 
> > I'm sending an updated patch. The improvement is that empty lines are
> > not considered comments. Example:
> > ```
> > // unrelated comment
> > 
> > // docstring
> > func sum(a, b int) int {
> > return a + b
> > }
> > ```
> > With point in the function body, C-c C-d jumps to "// docstring"
> > instead of "// unrelated comment".
> > 
> > Patch is below.
> 
> 
> Thanks!
> 
> @Randy, anything you want to add?

Only thing I would consider is if C-c C-d is the best keybind for it. go-mode 
seems to use C-c C-d to describe the expression at point. Not sure what else we 
would use C-c C-d for so it seems fine to me. And if we decide to have 
something similar to this across other ts modes, it would be nice if we could 
keep them consistent. If everyone's happy with C-c C-d, then I am too.

Otherwise, it looks good to me. Thanks for continuing to work on go-ts-mode, I 
should probably stop slacking so much ;).

> 
> By the way, the patch doesn't apply cleanly on my system, could you
> resend the patch as an attachment, maybe? 

Indeed. Evgeni, in the future can you submit all your patches as attachments? 
I've never been able to apply them cleanly and I'm not sure why.

> And also, have you done the paperwork for emacs contributions?

He should be good here, he submitted a big go-ts-mode patch a few weeks ago :).

> 
> Theo





reply via email to

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