all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang
@ 2024-05-02 15:36 Karl Hallsby via Guix-patches via
  2024-05-02 15:39 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
                   ` (5 more replies)
  0 siblings, 6 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-02 15:36 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

Verilog & VHDL have Emacs major modes for them.  I have tested that both
verilog-ts-mode and vhdl-ts-mode produce syntax highlighting.

Erlang does not have a tree-sitter-powered major-mode for Emacs yet.

Karl Hallsby (3):
  gnu: Add tree-sitter-verilog.
  gnu: Add tree-sitter-vhdl.
  gnu: Add tree-sitter-erlang.

 gnu/packages/tree-sitter.scm | 58 ++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)


base-commit: 5010a51fc91aeac5a3b87a3eea04f18f3fe8a3a3
--
2.41.0




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog.
  2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
@ 2024-05-02 15:39 ` Karl Hallsby via Guix-patches via
  2024-05-10 12:16   ` Zheng Junjie
  2024-05-02 15:39 ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-02 15:39 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-verilog): New variable.

Change-Id: I2066aff3cf39cebda956125cdac71236502a7ac5
---
 gnu/packages/tree-sitter.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index ee0acb82de..105581bfc4 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -701,3 +701,18 @@ (define-public tree-sitter-tlaplus
    "1.0.8"
    ;; Version 1.2.1 is most recent, but requires tree-sitter >0.21.0
    #:repository-url "https://github.com/tlaplus-community/tree-sitter-tlaplus"))
+
+(define-public tree-sitter-verilog
+  (let ((commit "902031343056bc0b11f3e47b33f036a9cf59f58d")
+        (revision "0"))
+    (tree-sitter-grammar
+     "verilog" "Verilog"
+     "1mrgdi0aj2bm4f2jdz93r1c3m1hiymjfhd2pc14xlz6waxpd48zg"
+     (git-version "0.0" revision commit)
+     #:commit commit
+     #:get-cleanup-snippet
+     (lambda _
+       #~(begin
+           (use-modules (guix build utils))
+           (delete-file "binding.gyp")
+           (delete-file-recursively "bindings"))))))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl.
  2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
  2024-05-02 15:39 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
@ 2024-05-02 15:39 ` Karl Hallsby via Guix-patches via
  2024-05-10 12:14   ` Zheng Junjie
  2024-05-02 15:39 ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-02 15:39 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-vhdl): New variable.

This is the tree-sitter-vhdl implementation the tree-sitter website points to,
but it seems that tree-sitter-vhdl seems to be abandoned (though it may be
complete).  The cleanup snippet does more work than it should probably do, but
it is the only way for


Change-Id: Ia26e33f9898573e70c9afdd4025e3770d042dbd6
---
 gnu/packages/tree-sitter.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 105581bfc4..42f311223e 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -716,3 +716,34 @@ (define-public tree-sitter-verilog
            (use-modules (guix build utils))
            (delete-file "binding.gyp")
            (delete-file-recursively "bindings"))))))
+
+(define-public tree-sitter-vhdl
+  (let ((commit "a3b2d84990527c7f8f4ae219c332c00c33d2d8e5")
+        (revision "0"))
+    (tree-sitter-grammar
+     "vhdl" "VHDL"
+     "0gz2b0qg1jzi2q6wgj6k6g35kmni3pqglq4f5kblkxx909463n8a"
+     (git-version "0.0.0" revision commit)
+     #:repository-url "https://github.com/alemuller/tree-sitter-vhdl"
+     #:commit commit
+     #:get-cleanup-snippet
+     (lambda _
+       #~(begin
+           (use-modules (guix build utils))
+           (delete-file "binding.gyp")
+           ;; tree-sitter-vhdl does not have bindings/ directory.
+           (delete-file "src/grammar.json")
+           (delete-file "src/node-types.json")
+           (delete-file "src/parser.c")
+           (delete-file-recursively "src/tree_sitter")
+           ;; Fix a query error in the highlight.scm query test. This would be
+           ;; easier with a patch, but this works too, and we still get to use
+           ;; tree-sitter-grammar. The fix is taken from here:
+           ;; https://github.com/n8tlarsen/tree-sitter-vhdl/commit/dabf157c6bb7220d72d3ceba0ce1abd90bf62187
+           ;; This is a documented issue that has not been resolved for nearly 2
+           ;; years.
+           ;; https://github.com/alemuller/tree-sitter-vhdl/issues/2
+           (substitute* "queries/highlights.scm"
+             (("\\(integer_decimal\n") "(integer_decimal)\n")
+             (("\\(integer\\)") "")
+             (("\"0\")") "\"0\"")))))))
--
2.41.0




^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang.
  2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
  2024-05-02 15:39 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
  2024-05-02 15:39 ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
@ 2024-05-02 15:39 ` Karl Hallsby via Guix-patches via
  2024-05-10 12:18   ` Zheng Junjie
  2024-05-10 16:26 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-02 15:39 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-erlang): New variable.

Change-Id: Ib1449549249816736bf30a1d419a23fd7a45570e
---
 gnu/packages/tree-sitter.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 42f311223e..dfe79496f9 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -426,6 +426,18 @@ (define-public tree-sitter-dockerfile
    "0.1.2"
    #:repository-url "https://github.com/camdencheek/tree-sitter-dockerfile"))
 
+(define-public tree-sitter-erlang
+  ;; This is an untagged release, for 0.4.0
+  ;; Newer versions use tree-sitter 0.22.1
+  (let ((commit "57e69513efd831f9cc8207d65d96bad917ca4aa4")
+        (revision "0"))
+  (tree-sitter-grammar
+   "erlang" "Erlang"
+   "1h0c9qc6i0kz5a0yq68xp623f84g4mc8hcp00khdbf7y7z7b9izc"
+   (git-version "0.0.0" revision commit)
+   #:repository-url "https://github.com/WhatsApp/tree-sitter-erlang"
+   #:commit commit)))
+
 (define-public tree-sitter-elm
   (tree-sitter-grammar
    "elm" "Elm"
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl.
  2024-05-02 15:39 ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
@ 2024-05-10 12:14   ` Zheng Junjie
  0 siblings, 0 replies; 15+ messages in thread
From: Zheng Junjie @ 2024-05-10 12:14 UTC (permalink / raw)
  To: 70720; +Cc: cox.katherine.e+guix, karl, liliana.prikler, andrew

[-- Attachment #1: Type: text/plain, Size: 2605 bytes --]

Karl Hallsby via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/tree-sitter.scm (tree-sitter-vhdl): New variable.
>
> This is the tree-sitter-vhdl implementation the tree-sitter website points to,
> but it seems that tree-sitter-vhdl seems to be abandoned (though it may be
> complete).  The cleanup snippet does more work than it should probably do, but
> it is the only way for
>
>
> Change-Id: Ia26e33f9898573e70c9afdd4025e3770d042dbd6
> ---
>  gnu/packages/tree-sitter.scm | 31 +++++++++++++++++++++++++++++++
>  1 file changed, 31 insertions(+)
>
> diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
> index 105581bfc4..42f311223e 100644
> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm
> @@ -716,3 +716,34 @@ (define-public tree-sitter-verilog
>             (use-modules (guix build utils))
>             (delete-file "binding.gyp")
>             (delete-file-recursively "bindings"))))))
> +
> +(define-public tree-sitter-vhdl
> +  (let ((commit "a3b2d84990527c7f8f4ae219c332c00c33d2d8e5")
> +        (revision "0"))
> +    (tree-sitter-grammar
> +     "vhdl" "VHDL"
> +     "0gz2b0qg1jzi2q6wgj6k6g35kmni3pqglq4f5kblkxx909463n8a"
> +     (git-version "0.0.0" revision commit)

i think version should 0.1.1, not 0.0.0

see https://github.com/alemuller/tree-sitter-vhdl/blob/main/package.json

> +     #:repository-url "https://github.com/alemuller/tree-sitter-vhdl"
> +     #:commit commit
> +     #:get-cleanup-snippet
> +     (lambda _
> +       #~(begin
> +           (use-modules (guix build utils))
> +           (delete-file "binding.gyp")
> +           ;; tree-sitter-vhdl does not have bindings/ directory.
> +           (delete-file "src/grammar.json")
> +           (delete-file "src/node-types.json")
> +           (delete-file "src/parser.c")
> +           (delete-file-recursively "src/tree_sitter")
> +           ;; Fix a query error in the highlight.scm query test. This would be
> +           ;; easier with a patch, but this works too, and we still get to use
> +           ;; tree-sitter-grammar. The fix is taken from here:
> +           ;; https://github.com/n8tlarsen/tree-sitter-vhdl/commit/dabf157c6bb7220d72d3ceba0ce1abd90bf62187
> +           ;; This is a documented issue that has not been resolved for nearly 2
> +           ;; years.
> +           ;; https://github.com/alemuller/tree-sitter-vhdl/issues/2
> +           (substitute* "queries/highlights.scm"
> +             (("\\(integer_decimal\n") "(integer_decimal)\n")
> +             (("\\(integer\\)") "")
> +             (("\"0\")") "\"0\"")))))))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog.
  2024-05-02 15:39 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
@ 2024-05-10 12:16   ` Zheng Junjie
  0 siblings, 0 replies; 15+ messages in thread
From: Zheng Junjie @ 2024-05-10 12:16 UTC (permalink / raw)
  To: 70720; +Cc: cox.katherine.e+guix, karl, liliana.prikler, andrew

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

Karl Hallsby via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/tree-sitter.scm (tree-sitter-verilog): New variable.
>
> Change-Id: I2066aff3cf39cebda956125cdac71236502a7ac5
> ---
>  gnu/packages/tree-sitter.scm | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
> index ee0acb82de..105581bfc4 100644
> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm
> @@ -701,3 +701,18 @@ (define-public tree-sitter-tlaplus
>     "1.0.8"
>     ;; Version 1.2.1 is most recent, but requires tree-sitter >0.21.0
>     #:repository-url "https://github.com/tlaplus-community/tree-sitter-tlaplus"))
> +
> +(define-public tree-sitter-verilog
> +  (let ((commit "902031343056bc0b11f3e47b33f036a9cf59f58d")
> +        (revision "0"))
> +    (tree-sitter-grammar
> +     "verilog" "Verilog"
> +     "1mrgdi0aj2bm4f2jdz93r1c3m1hiymjfhd2pc14xlz6waxpd48zg"
> +     (git-version "0.0" revision commit)

should 1.0.0, see
https://github.com/tree-sitter/tree-sitter-verilog/blob/902031343056bc0b11f3e47b33f036a9cf59f58d/package.json


> +     #:commit commit
> +     #:get-cleanup-snippet
> +     (lambda _
> +       #~(begin
> +           (use-modules (guix build utils))
> +           (delete-file "binding.gyp")
> +           (delete-file-recursively "bindings"))))))

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang.
  2024-05-02 15:39 ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
@ 2024-05-10 12:18   ` Zheng Junjie
  0 siblings, 0 replies; 15+ messages in thread
From: Zheng Junjie @ 2024-05-10 12:18 UTC (permalink / raw)
  To: 70720; +Cc: cox.katherine.e+guix, karl, liliana.prikler, andrew

[-- Attachment #1: Type: text/plain, Size: 1239 bytes --]

Karl Hallsby via Guix-patches via <guix-patches@gnu.org> writes:

> * gnu/packages/tree-sitter.scm (tree-sitter-erlang): New variable.
>
> Change-Id: Ib1449549249816736bf30a1d419a23fd7a45570e
> ---
>  gnu/packages/tree-sitter.scm | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
> index 42f311223e..dfe79496f9 100644
> --- a/gnu/packages/tree-sitter.scm
> +++ b/gnu/packages/tree-sitter.scm
> @@ -426,6 +426,18 @@ (define-public tree-sitter-dockerfile
>     "0.1.2"
>     #:repository-url "https://github.com/camdencheek/tree-sitter-dockerfile"))
>  
> +(define-public tree-sitter-erlang
> +  ;; This is an untagged release, for 0.4.0
> +  ;; Newer versions use tree-sitter 0.22.1
> +  (let ((commit "57e69513efd831f9cc8207d65d96bad917ca4aa4")
> +        (revision "0"))
> +  (tree-sitter-grammar
> +   "erlang" "Erlang"
> +   "1h0c9qc6i0kz5a0yq68xp623f84g4mc8hcp00khdbf7y7z7b9izc"
> +   (git-version "0.0.0" revision commit)

should "0.4.0"

> +   #:repository-url "https://github.com/WhatsApp/tree-sitter-erlang"
> +   #:commit commit)))
> +
>  (define-public tree-sitter-elm
>    (tree-sitter-grammar
>     "elm" "Elm"

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog.
  2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
                   ` (2 preceding siblings ...)
  2024-05-02 15:39 ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
@ 2024-05-10 16:26 ` Karl Hallsby via Guix-patches via
  2024-05-10 16:26   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
                     ` (2 more replies)
  2024-05-10 18:28 ` Karl Hallsby via Guix-patches via
  2024-05-13 16:40 ` [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Zheng Junjie
  5 siblings, 3 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-10 16:26 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-verilog): New variable.

Change-Id: I2066aff3cf39cebda956125cdac71236502a7ac5

Change-Id: If4acb8c10cd3942f46dcb05b8009760a6452b67a
---
 gnu/packages/tree-sitter.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index ee0acb82de..206fd7268e 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -701,3 +701,19 @@ (define-public tree-sitter-tlaplus
    "1.0.8"
    ;; Version 1.2.1 is most recent, but requires tree-sitter >0.21.0
    #:repository-url "https://github.com/tlaplus-community/tree-sitter-tlaplus"))
+
+(define-public tree-sitter-verilog
+  (let ((version "1.0.0") ; In package.json, but untagged
+        (commit "075ebfc84543675f12e79a955f79d717772dcef3")
+        (revision "0"))
+    (tree-sitter-grammar
+     "verilog" "Verilog"
+     "0j5iycqm5dmvzy7dssm8km1djhr7hnfgk26zyzcxanhrwwq3wi4k"
+     (git-version version revision commit)
+     #:commit commit
+     #:get-cleanup-snippet
+     (lambda _
+       #~(begin
+           (use-modules (guix build utils))
+           (delete-file "binding.gyp")
+           (delete-file-recursively "bindings"))))))

base-commit: 5010a51fc91aeac5a3b87a3eea04f18f3fe8a3a3
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl.
  2024-05-10 16:26 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
@ 2024-05-10 16:26   ` Karl Hallsby via Guix-patches via
  2024-05-10 16:26   ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
  2024-05-10 16:49   ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Liliana Marie Prikler
  2 siblings, 0 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-10 16:26 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-vhdl): New variable.

Change-Id: Ia26e33f9898573e70c9afdd4025e3770d042dbd6

Change-Id: I07b2b89f878957af1544344122cdfe8970efc9f7
---
 gnu/packages/tree-sitter.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 206fd7268e..3863558883 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -717,3 +717,35 @@ (define-public tree-sitter-verilog
            (use-modules (guix build utils))
            (delete-file "binding.gyp")
            (delete-file-recursively "bindings"))))))
+
+(define-public tree-sitter-vhdl
+  (let ((version "0.1.1") ; In package.json, but untagged
+        (commit "a3b2d84990527c7f8f4ae219c332c00c33d2d8e5")
+        (revision "0"))
+    (tree-sitter-grammar
+     "vhdl" "VHDL"
+     "0gz2b0qg1jzi2q6wgj6k6g35kmni3pqglq4f5kblkxx909463n8a"
+     (git-version version revision commit)
+     #:repository-url "https://github.com/alemuller/tree-sitter-vhdl"
+     #:commit commit
+     #:get-cleanup-snippet
+     (lambda _
+       #~(begin
+           (use-modules (guix build utils))
+           (delete-file "binding.gyp")
+           ;; tree-sitter-vhdl does not have bindings/ directory.
+           (delete-file "src/grammar.json")
+           (delete-file "src/node-types.json")
+           (delete-file "src/parser.c")
+           (delete-file-recursively "src/tree_sitter")
+           ;; Fix a query error in the highlight.scm query test. This would be
+           ;; easier with a patch, but this works too, and we still get to use
+           ;; tree-sitter-grammar. The fix is taken from here:
+           ;; https://github.com/n8tlarsen/tree-sitter-vhdl/commit/dabf157c6bb7220d72d3ceba0ce1abd90bf62187
+           ;; This is a documented issue that has not been resolved for nearly 2
+           ;; years.
+           ;; https://github.com/alemuller/tree-sitter-vhdl/issues/2
+           (substitute* "queries/highlights.scm"
+             (("\\(integer_decimal\n") "(integer_decimal)\n")
+             (("\\(integer\\)") "")
+             (("\"0\")") "\"0\"")))))))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang.
  2024-05-10 16:26 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
  2024-05-10 16:26   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
@ 2024-05-10 16:26   ` Karl Hallsby via Guix-patches via
  2024-05-10 16:49   ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Liliana Marie Prikler
  2 siblings, 0 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-10 16:26 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-erlang): New variable.

Change-Id: Ib1449549249816736bf30a1d419a23fd7a45570e

Change-Id: I99cdde6418e04d4898f0f6509d2e7d849e2a4f22
---
 gnu/packages/tree-sitter.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 3863558883..c6e84bc85b 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -426,6 +426,18 @@ (define-public tree-sitter-dockerfile
    "0.1.2"
    #:repository-url "https://github.com/camdencheek/tree-sitter-dockerfile"))
 
+(define-public tree-sitter-erlang
+  ;; Versions newer than 0.4.0 use tree-sitter 0.22.1
+  (let ((version "0.4.0") ; In Cargo.toml, but untagged
+        (commit "57e69513efd831f9cc8207d65d96bad917ca4aa4")
+        (revision "0"))
+  (tree-sitter-grammar
+   "erlang" "Erlang"
+   "1h0c9qc6i0kz5a0yq68xp623f84g4mc8hcp00khdbf7y7z7b9izc"
+   (git-version version revision commit)
+   #:repository-url "https://github.com/WhatsApp/tree-sitter-erlang"
+   #:commit commit)))
+
 (define-public tree-sitter-elm
   (tree-sitter-grammar
    "elm" "Elm"
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog.
  2024-05-10 16:26 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
  2024-05-10 16:26   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
  2024-05-10 16:26   ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
@ 2024-05-10 16:49   ` Liliana Marie Prikler
  2 siblings, 0 replies; 15+ messages in thread
From: Liliana Marie Prikler @ 2024-05-10 16:49 UTC (permalink / raw)
  To: Karl Hallsby, 70720; +Cc: Katherine Cox-Buday, Andrew Tropin

Am Freitag, dem 10.05.2024 um 11:26 -0500 schrieb Karl Hallsby:
> * gnu/packages/tree-sitter.scm (tree-sitter-verilog): New variable.
> 
> Change-Id: I2066aff3cf39cebda956125cdac71236502a7ac5
> 
> Change-Id: If4acb8c10cd3942f46dcb05b8009760a6452b67a
> ---
Don't do multiple Change-Ids.

Cheers




^ permalink raw reply	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog.
  2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
                   ` (3 preceding siblings ...)
  2024-05-10 16:26 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
@ 2024-05-10 18:28 ` Karl Hallsby via Guix-patches via
  2024-05-10 18:28   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
  2024-05-10 18:28   ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
  2024-05-13 16:40 ` [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Zheng Junjie
  5 siblings, 2 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-10 18:28 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-verilog): New variable.

Change-Id: If4acb8c10cd3942f46dcb05b8009760a6452b67a
---
 gnu/packages/tree-sitter.scm | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index ee0acb82de..206fd7268e 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -701,3 +701,19 @@ (define-public tree-sitter-tlaplus
    "1.0.8"
    ;; Version 1.2.1 is most recent, but requires tree-sitter >0.21.0
    #:repository-url "https://github.com/tlaplus-community/tree-sitter-tlaplus"))
+
+(define-public tree-sitter-verilog
+  (let ((version "1.0.0") ; In package.json, but untagged
+        (commit "075ebfc84543675f12e79a955f79d717772dcef3")
+        (revision "0"))
+    (tree-sitter-grammar
+     "verilog" "Verilog"
+     "0j5iycqm5dmvzy7dssm8km1djhr7hnfgk26zyzcxanhrwwq3wi4k"
+     (git-version version revision commit)
+     #:commit commit
+     #:get-cleanup-snippet
+     (lambda _
+       #~(begin
+           (use-modules (guix build utils))
+           (delete-file "binding.gyp")
+           (delete-file-recursively "bindings"))))))

base-commit: 5010a51fc91aeac5a3b87a3eea04f18f3fe8a3a3
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl.
  2024-05-10 18:28 ` Karl Hallsby via Guix-patches via
@ 2024-05-10 18:28   ` Karl Hallsby via Guix-patches via
  2024-05-10 18:28   ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
  1 sibling, 0 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-10 18:28 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-vhdl): New variable.

Change-Id: I07b2b89f878957af1544344122cdfe8970efc9f7
---
 gnu/packages/tree-sitter.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 206fd7268e..3863558883 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -717,3 +717,35 @@ (define-public tree-sitter-verilog
            (use-modules (guix build utils))
            (delete-file "binding.gyp")
            (delete-file-recursively "bindings"))))))
+
+(define-public tree-sitter-vhdl
+  (let ((version "0.1.1") ; In package.json, but untagged
+        (commit "a3b2d84990527c7f8f4ae219c332c00c33d2d8e5")
+        (revision "0"))
+    (tree-sitter-grammar
+     "vhdl" "VHDL"
+     "0gz2b0qg1jzi2q6wgj6k6g35kmni3pqglq4f5kblkxx909463n8a"
+     (git-version version revision commit)
+     #:repository-url "https://github.com/alemuller/tree-sitter-vhdl"
+     #:commit commit
+     #:get-cleanup-snippet
+     (lambda _
+       #~(begin
+           (use-modules (guix build utils))
+           (delete-file "binding.gyp")
+           ;; tree-sitter-vhdl does not have bindings/ directory.
+           (delete-file "src/grammar.json")
+           (delete-file "src/node-types.json")
+           (delete-file "src/parser.c")
+           (delete-file-recursively "src/tree_sitter")
+           ;; Fix a query error in the highlight.scm query test. This would be
+           ;; easier with a patch, but this works too, and we still get to use
+           ;; tree-sitter-grammar. The fix is taken from here:
+           ;; https://github.com/n8tlarsen/tree-sitter-vhdl/commit/dabf157c6bb7220d72d3ceba0ce1abd90bf62187
+           ;; This is a documented issue that has not been resolved for nearly 2
+           ;; years.
+           ;; https://github.com/alemuller/tree-sitter-vhdl/issues/2
+           (substitute* "queries/highlights.scm"
+             (("\\(integer_decimal\n") "(integer_decimal)\n")
+             (("\\(integer\\)") "")
+             (("\"0\")") "\"0\"")))))))
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang.
  2024-05-10 18:28 ` Karl Hallsby via Guix-patches via
  2024-05-10 18:28   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
@ 2024-05-10 18:28   ` Karl Hallsby via Guix-patches via
  1 sibling, 0 replies; 15+ messages in thread
From: Karl Hallsby via Guix-patches via @ 2024-05-10 18:28 UTC (permalink / raw)
  To: 70720
  Cc: Karl Hallsby, Andrew Tropin, Katherine Cox-Buday,
	Liliana Marie Prikler

* gnu/packages/tree-sitter.scm (tree-sitter-erlang): New variable.

Change-Id: I99cdde6418e04d4898f0f6509d2e7d849e2a4f22
---
 gnu/packages/tree-sitter.scm | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/gnu/packages/tree-sitter.scm b/gnu/packages/tree-sitter.scm
index 3863558883..c6e84bc85b 100644
--- a/gnu/packages/tree-sitter.scm
+++ b/gnu/packages/tree-sitter.scm
@@ -426,6 +426,18 @@ (define-public tree-sitter-dockerfile
    "0.1.2"
    #:repository-url "https://github.com/camdencheek/tree-sitter-dockerfile"))
 
+(define-public tree-sitter-erlang
+  ;; Versions newer than 0.4.0 use tree-sitter 0.22.1
+  (let ((version "0.4.0") ; In Cargo.toml, but untagged
+        (commit "57e69513efd831f9cc8207d65d96bad917ca4aa4")
+        (revision "0"))
+  (tree-sitter-grammar
+   "erlang" "Erlang"
+   "1h0c9qc6i0kz5a0yq68xp623f84g4mc8hcp00khdbf7y7z7b9izc"
+   (git-version version revision commit)
+   #:repository-url "https://github.com/WhatsApp/tree-sitter-erlang"
+   #:commit commit)))
+
 (define-public tree-sitter-elm
   (tree-sitter-grammar
    "elm" "Elm"
-- 
2.41.0





^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang
  2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
                   ` (4 preceding siblings ...)
  2024-05-10 18:28 ` Karl Hallsby via Guix-patches via
@ 2024-05-13 16:40 ` Zheng Junjie
  5 siblings, 0 replies; 15+ messages in thread
From: Zheng Junjie @ 2024-05-13 16:40 UTC (permalink / raw)
  To: 70720
  Cc: Katherine Cox-Buday, 70720-done, Karl Hallsby,
	Liliana Marie Prikler, Andrew Tropin

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

Karl Hallsby via Guix-patches via <guix-patches@gnu.org> writes:

> Verilog & VHDL have Emacs major modes for them.  I have tested that both
> verilog-ts-mode and vhdl-ts-mode produce syntax highlighting.
>
> Erlang does not have a tree-sitter-powered major-mode for Emacs yet.
>
> Karl Hallsby (3):
>   gnu: Add tree-sitter-verilog.
>   gnu: Add tree-sitter-vhdl.
>   gnu: Add tree-sitter-erlang.
>
>  gnu/packages/tree-sitter.scm | 58 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>
>
> base-commit: 5010a51fc91aeac5a3b87a3eea04f18f3fe8a3a3

push, see
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=65186deae436f419fbe56a88d097181453728a29
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=6b6ad68559ef57764af6460aef6d5cd46fab06eb
https://git.savannah.gnu.org/cgit/guix.git/commit/?id=b23aa4c1d6ebbbee316d2f2bee87ad4ce7c67345

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2024-05-13 16:42 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-02 15:36 [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Karl Hallsby via Guix-patches via
2024-05-02 15:39 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
2024-05-10 12:16   ` Zheng Junjie
2024-05-02 15:39 ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
2024-05-10 12:14   ` Zheng Junjie
2024-05-02 15:39 ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
2024-05-10 12:18   ` Zheng Junjie
2024-05-10 16:26 ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Karl Hallsby via Guix-patches via
2024-05-10 16:26   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
2024-05-10 16:26   ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
2024-05-10 16:49   ` [bug#70720] [PATCH 1/3] gnu: Add tree-sitter-verilog Liliana Marie Prikler
2024-05-10 18:28 ` Karl Hallsby via Guix-patches via
2024-05-10 18:28   ` [bug#70720] [PATCH 2/3] gnu: Add tree-sitter-vhdl Karl Hallsby via Guix-patches via
2024-05-10 18:28   ` [bug#70720] [PATCH 3/3] gnu: Add tree-sitter-erlang Karl Hallsby via Guix-patches via
2024-05-13 16:40 ` [bug#70720] [PATCH 0/3] Add tree-sitter-verilog/-vhdl/-erlang Zheng Junjie

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.