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: Randy Taylor <dev <at> rjt.dev>
To: Gabriel Santos <gabrielsantosdesouza <at> disroot.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 74461 <at> debbugs.gnu.org
Subject: bug#74461: [PATCH] Add go-work-ts-mode
Date: Fri, 22 Nov 2024 02:36:34 +0000
On Thursday, November 21st, 2024 at 05:49, Gabriel Santos via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org> wrote:
>
> 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.

Thanks for working on this.

>
> 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)

Users can disable this if they desire.

> - The grammar might be outdated (I found no issues when testing)
> - Eglot addition might be unecessary

I think it's fine.

> - 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

+    "go-work")
+        # The parser is called "gowork".
+        lang="gomod"
Copy paste error ("gowork" instead)?

It would be nice to have syntax highlighting and indentation tests for
this (ideally covering everything). If you're interested, take a look
at go-ts-mode-tests.el and the files it references for inspiration.




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.