]> git.eshelyaron.com Git - emacs.git/commit
Add go-work-ts-mode for Go workspace files
authorGabriel Santos <gabrielsantosdesouza@disroot.org>
Thu, 21 Nov 2024 02:07:28 +0000 (23:07 -0300)
committerEshel Yaron <me@eshelyaron.com>
Wed, 12 Feb 2025 10:52:57 +0000 (11:52 +0100)
commitae367bb70e8074d822b3568e9b5c1ddd3399eb3a
treed1e9feb8e1c6e1d68efd63ac0e602a6dffb3fea8
parent7beb3698b6ab15e2bc0d3ba792808ab411ca3b67
Add go-work-ts-mode for Go workspace files

* lisp/progmodes/eglot.el (eglot-server-programs): Add go-work-ts-mode.
* lisp/progmodes/go-ts-mode.el
(Commentary): Add the repositories for the grammars.
(go-work-ts-mode--indent-rules, go-work-ts-mode--keywords)
(go-work-ts-mode--font-lock-settings): New variables.
(go-work-ts-mode--directive-matcher, go-work-ts-mode): New functions.
(go-mod-ts-mode--directive-matcher): Rename from
go-mod-ts-mode--in-directive-p.  Be more specific on the directive
location (modules).  Replace mention of nil with function.  Use member
instead of pcase to check node types.

* admin/notes/tree-sitter/build-module/batch.sh
* admin/notes/tree-sitter/build-module/build.sh: Add go-work support.

* test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go:
* test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts:
* test/lisp/progmodes/go-ts-mode-resources/indent-work.erts:
New files for testing indentation and font-locking for Go
module and workspace files.
* test/lisp/progmodes/go-ts-mode-tests.el: Add tests for Go module and
workspace files.  (Bug#74461)

* etc/NEWS: Announce go-work-ts-mode.

(cherry picked from commit aade1b707c6b4932ed023f387d49324c6a7123eb)
admin/notes/tree-sitter/build-module/batch.sh
admin/notes/tree-sitter/build-module/build.sh
lisp/progmodes/eglot.el
lisp/progmodes/go-ts-mode.el
test/lisp/progmodes/go-ts-mode-resources/font-lock-package.go [new file with mode: 0644]
test/lisp/progmodes/go-ts-mode-resources/indent-mod.erts [new file with mode: 0644]
test/lisp/progmodes/go-ts-mode-resources/indent-work.erts [new file with mode: 0644]
test/lisp/progmodes/go-ts-mode-tests.el