GNU bug report logs - #74461
[PATCH] Add go-work-ts-mode

Previous Next

Package: emacs;

Reported by: Gabriel Santos <gabrielsantosdesouza <at> disroot.org>

Date: Thu, 21 Nov 2024 13:59:02 UTC

Severity: wishlist

Tags: confirmed, patch

Fixed in version 31.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Stefan Kangas <stefankangas <at> gmail.com>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#74461: closed ([PATCH] Add go-work-ts-mode)
Date: Wed, 12 Feb 2025 05:55:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Tue, 11 Feb 2025 21:54:11 -0800
with message-id <CADwFkm=RjyfOxUcc=zJvXVPDxXb6ZmXd3TX1P7m3YrSzL1O2AA <at> mail.gmail.com>
and subject line Re: bug#74461: [PATCH] Add go-work-ts-mode
has caused the debbugs.gnu.org bug report #74461,
regarding [PATCH] Add go-work-ts-mode
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
74461: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=74461
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Gabriel Santos <gabrielsantosdesouza <at> disroot.org>
To: bug-gnu-emacs <at> gnu.org
Subject: [PATCH] Add go-work-ts-mode
Date: Thu, 21 Nov 2024 07:49:35 -0300
[Message part 3 (text/plain, inline)]
Greetings,

I wrote a tree-sitter mode after founding there wasn't one for Go
Workspace files. I'd like to say thanks to Randy Taylor on his work to
the Go tree-sitter mode, helped me a lot in this process.

Commit message:

* admin/notes/tree-sitter/build-module/batch.sh:
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.
* etc/NEWS: Mention go-work-ts-mode.
* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode: Add go-work-ts-mode for working with
workspace files.

The parser can be found here:
https://github.com/omertuc/tree-sitter-go-work

And I tested changes locally with a package:
https://github.com/gs-101/go-work-ts-mode

Issues that could be found:

- Some syntax highlighting might be unecessary (ERROR face)
- The grammar might be outdated (I found no issues when testing)
- Eglot addition might be unecessary
- Grammar elements could be missing (I checked both grammar.js and
- grammar.json, and only found the keywords added here)

I will mail my copyright assignment to the FSF still today.

Regards,

-- Gabriel Santos

[0001-Add-go-work-ts-mode.patch (text/x-patch, attachment)]
[Message part 5 (message/rfc822, inline)]
From: Stefan Kangas <stefankangas <at> gmail.com>
To: Randy Taylor <dev <at> rjt.dev>
Cc: 74461-done <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> gnu.org>,
 Gabriel Santos <gabrielsantosdesouza <at> disroot.org>,
 Stefan Monnier <monnier <at> iro.umontreal.ca>
Subject: Re: bug#74461: [PATCH] Add go-work-ts-mode
Date: Tue, 11 Feb 2025 21:54:11 -0800
Version: 31.1

Randy Taylor <dev <at> rjt.dev> writes:

> On Wednesday, January 1st, 2025 at 21:24, Gabriel Santos
> <gabrielsantosdesouza <at> disroot.org> wrote:
>>
>>
>> Updated the patch to follow the suggestions made by Randy:
>>
>> - Rename go-mod-ts-mode--in-directive-p
>> - Add latest grammar versions of go-mod and go-work
>> - Removed the mention of the now defunct go-work-ts-mode--syntax-table
>> - Added back the syntax table for the regular Go tree-sitter mode
>>
>> --
>> Gabriel Santos
>
> Thanks, looks good to me.
>
> Eli, please install if you have no further comments. Thanks in
> advance.

The patch LGTM also, so I installed it on master as commit aade1b707c6.
Please note the changes I did to the commit message for any future
contributions.  Thanks Gabriel, for the patch.

I'm consequently closing this bug report.


This bug report was last modified 103 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.