From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Martin via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#70299: 30.0.50; go-ts-mode + tree-sitter-go@v0.20.0 no highlighting Date: Tue, 9 Apr 2024 00:43:57 +0100 Message-ID: Reply-To: Martin Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000ad950206159e6175" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9516"; mail-complaints-to="usenet@ciao.gmane.io" To: 70299@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Apr 09 06:47:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ru3OF-0002I7-Qm for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 09 Apr 2024 06:47:23 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ru3Ns-0001Bh-7N; Tue, 09 Apr 2024 00:47:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ru3Np-00019t-49 for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 00:46:57 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ru3No-0002TJ-Mw for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 00:46:56 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ru3Nv-0004aB-Du for bug-gnu-emacs@gnu.org; Tue, 09 Apr 2024 00:47:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Martin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 09 Apr 2024 04:47:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70299 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.171263796817301 (code B ref -1); Tue, 09 Apr 2024 04:47:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Apr 2024 04:46:08 +0000 Original-Received: from localhost ([127.0.0.1]:48063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ru3Mz-0004UY-Lf for submit@debbugs.gnu.org; Tue, 09 Apr 2024 00:46:07 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:41490) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rtyf6-0002L1-LY for submit@debbugs.gnu.org; Mon, 08 Apr 2024 19:44:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rtyeq-00047h-OI for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 19:44:13 -0400 Original-Received: from mail-pg1-x530.google.com ([2607:f8b0:4864:20::530]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rtyeo-00035s-9d for bug-gnu-emacs@gnu.org; Mon, 08 Apr 2024 19:44:12 -0400 Original-Received: by mail-pg1-x530.google.com with SMTP id 41be03b00d2f7-5f034b4dcecso3379722a12.1 for ; Mon, 08 Apr 2024 16:44:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1712619848; x=1713224648; darn=gnu.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=gJKRLnjiQSSAnihjVMmuLc+AMSvWDpkso1uLhAVVTEE=; b=L5lR0j1S0fFN2UGc8lGmkQpRwHJbzUpwyXZyDASCtOlmhmrig9MaFHfeQbU6cJU2TT 3Q2c1P0QA2b6Im4XfuoVr79ZlBL3f8fhCsA+z+P+Ip/TCQkYJg8kACvZdXRkbHWTJ4z2 4mWtAUiAS4GnJwtz+5hp7y+7jvcwp+GiX7XeSDelQU8wHCoU6gqOsbnAU0vEaZwG39ID b9+GS9Tz2T8xAeID5ZvlV/sgN17SFipUpnLDmguDBxzok5eBAulWDOwe6+Pg/+uCQ02H +qxvZIY68sz++TUpFuyzrRVvoU7Tc5x1kgK/l5lwRu+YvFIX8k6diHKkzWJ1arquAj4Q V5ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712619848; x=1713224648; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=gJKRLnjiQSSAnihjVMmuLc+AMSvWDpkso1uLhAVVTEE=; b=GeS3Hi/Gt0ax65Oqgxto5iKKE+26bA31Loa9j+PmTyMQFNkqqAEj1ss9lsWaRqEqEc Uy9qF1FeiR8fcE1/KSzxBSdTm5B4qFFcIqoI9NlqirMa2UBNmcTCTyzLQyltFmYirrla kCLueEdz++v56bk++9LB8oUePAUqW01qNmLeBseP6gGZP97IKvrGPaEM1e5/QYWSv7FI fxeb2sNHw7GY3Z32od6/qbnqvFxkVjafnxvliCvx5ZSN3/4nTJ4CUH2BPfEY12z3xaDf /Qr/cgh8VQJvN2heoOJFG0bJYClNFprgLhadrxOVDmapVqeSl2CQ8Baw+0yS4k8pblOb 6dug== X-Gm-Message-State: AOJu0YyS+5s5AawJkHGsngqII2Mn93a6L9nXq9Y8Qa1vZm9VieLcH3Sb JqfFJ5oVJ/Aw0nLyMPzkX21Ltg364ObsepzkhHPmYxRo+sD8MHnfU1Y51H6hkGi/c+Tkb9TWTNb zwr1DOBTp98B97ec0c8MokvryUDjMq6WFRgA1pw== X-Google-Smtp-Source: AGHT+IFtplHpH6IY+sc4AwzxWzfZqyDc2CQ1UrCc8VLTWX+t22caEiBftGjdhh0/D3Myi8+Oc0/rQraGIy2MYUD5di0= X-Received: by 2002:a17:903:185:b0:1e2:7734:63dd with SMTP id z5-20020a170903018500b001e2773463ddmr1694051plg.30.1712619848043; Mon, 08 Apr 2024 16:44:08 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::530; envelope-from=martin.tang365@googlemail.com; helo=mail-pg1-x530.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 09 Apr 2024 00:46:03 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:282965 Archived-At: --000000000000ad950206159e6175 Content-Type: text/plain; charset="UTF-8" --text follows this line-- - emacs -Q; - M-x treesit-install-language-grammar - go - github.com/tree-sitter/tree-sitter-go - Open up a new buffer and use go-ts-mode - Write some go-code ``` package my_pkg type myStruct struct {} func MyFunc(x context.Context) error {} ``` - Observe that there is no syntax highlighting - Observe that treesit-explore-mode seems to work properly - Conclude that there is something wrong with go-ts-mode's highlighting. There is highlighting with tree-sitter-go v0.19.1, but that grammar also seems to come with some bugs. In GNU Emacs 30.0.50 (build 1, aarch64-apple-darwin23.4.0, NS appkit-2487.50 Version 14.4.1 (Build 23E224)) of 2024-04-08 built on MF9VWRYQFN Windowing system distributor 'Apple', version 10.3.2487 System Description: macOS 14.4.1 Configured using: 'configure --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/opt/homebrew/share/emacs/site-lisp --infodir=/opt/homebrew/Cellar/emacs-plus@30/30.0.50/share/info/emacs --prefix=/opt/homebrew/Cellar/emacs-plus@30/30.0.50 --with-xml2 --with-gnutls --without-compress-install --without-dbus --without-imagemagick --with-modules --with-rsvg --with-webp --with-ns --disable-ns-self-contained 'CFLAGS=-Os -w -pipe -mmacosx-version-min=14 -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -DFD_SETSIZE=10000 -DDARWIN_UNLIMITED_SELECT' 'CPPFLAGS=-I/opt/homebrew/opt/icu4c/include -I/opt/homebrew/opt/sqlite/include -I/opt/homebrew/opt/readline/include -isystem/opt/homebrew/include -F/opt/homebrew/Frameworks -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk' 'LDFLAGS=-L/opt/homebrew/opt/icu4c/lib -L/opt/homebrew/opt/sqlite/lib -L/opt/homebrew/opt/readline/lib -L/opt/homebrew/lib -F/opt/homebrew/Frameworks -Wl,-headerpad_max_install_names -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk'' Configured features: ACL GIF GLIB GMP GNUTLS JPEG LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER PNG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM ZLIB Important settings: value of $LANG: en_GB.UTF-8 locale-coding-system: utf-8-unix Major mode: Go Minor modes in effect: treesit-explore-mode: t tooltip-mode: t global-eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t minibuffer-regexp-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils python rx project byte-opt gv bytecomp byte-compile compat pcase comint ansi-osc ring ansi-color cl-seq go-ts-mode treesit vc-git diff-mode easy-mmode vc-dispatcher cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs theme-loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 104850 12135) (symbols 48 7868 0) (strings 32 21254 2120) (string-bytes 1 586116) (vectors 16 14537) (vector-slots 8 156722 9447) (floats 8 27 34) (intervals 56 5547 0) (buffers 992 13)) --000000000000ad950206159e6175 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
--text follows this line--

- emacs -Q;
- M-x tre= esit-install-language-grammar
=C2=A0 - go
=C2=A0 - github.com/tree-sitter/tree-sitter-g= o

- Open up a new buffer and use go-ts-mode
- Write some go-c= ode
```
package my_pkg
type myStruct struct {}
func MyFunc(x c= ontext.Context) error {}
```
- Observe that there is no syntax highli= ghting
- Observe that treesit-explore-mode seems to work properly
- C= onclude that there is something wrong with go-ts-mode's
=C2=A0 highl= ighting. There is highlighting with tree-sitter-go v0.19.1, but
=C2=A0 t= hat grammar also seems to come with some bugs.


In GNU Emacs 30.0= .50 (build 1, aarch64-apple-darwin23.4.0, NS
=C2=A0appkit-2487.50 Versio= n 14.4.1 (Build 23E224)) of 2024-04-08 built on
=C2=A0MF9VWRYQFN
Wind= owing system distributor 'Apple', version 10.3.2487
System Descr= iption: =C2=A0macOS 14.4.1

Configured using:
=C2=A0'configure= --disable-dependency-tracking --disable-silent-rules
=C2=A0--enable-loc= allisppath=3D/opt/homebrew/share/emacs/site-lisp
=C2=A0--infodir=3D/opt/= homebrew/Cellar/emacs-plus@30/30.0.50/share/info/emacs
=C2=A0--prefix=3D= /opt/homebrew/Cellar/emacs-plus@30/30.0.50 --with-xml2
=C2=A0--with-gnut= ls --without-compress-install --without-dbus
=C2=A0--without-imagemagick= --with-modules --with-rsvg --with-webp --with-ns
=C2=A0--disable-ns-sel= f-contained 'CFLAGS=3D-Os -w -pipe
=C2=A0-mmacosx-version-min=3D14=C2=A0-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk
= =C2=A0-DFD_SETSIZE=3D10000 -DDARWIN_UNLIMITED_SELECT'
=C2=A0'CPP= FLAGS=3D-I/opt/homebrew/opt/icu4c/include
=C2=A0-I/opt/homebrew/opt/sqli= te/include -I/opt/homebrew/opt/readline/include
=C2=A0-isystem/opt/homeb= rew/include -F/opt/homebrew/Frameworks
=C2=A0-isysroot/Library/Developer= /CommandLineTools/SDKs/MacOSX14.sdk'
=C2=A0'LDFLAGS=3D-L/opt/hom= ebrew/opt/icu4c/lib -L/opt/homebrew/opt/sqlite/lib
=C2=A0-L/opt/homebrew= /opt/readline/lib -L/opt/homebrew/lib
=C2=A0-F/opt/homebrew/Frameworks -= Wl,-headerpad_max_install_names
=C2=A0-isysroot/Library/Developer/Comman= dLineTools/SDKs/MacOSX14.sdk''

Configured features:
ACL G= IF GLIB GMP GNUTLS JPEG LCMS2 LIBXML2 MODULES NOTIFY KQUEUE NS
PDUMPER P= NG RSVG SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP XIM ZL= IB

Important settings:
=C2=A0 value of $LANG: en_GB.UTF-8
=C2= =A0 locale-coding-system: utf-8-unix

Major mode: Go

Minor mod= es in effect:
=C2=A0 treesit-explore-mode: t
=C2=A0 tooltip-mode: t=C2=A0 global-eldoc-mode: t
=C2=A0 show-paren-mode: t
=C2=A0 electr= ic-indent-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t<= br>=C2=A0 menu-bar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 glo= bal-font-lock-mode: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mo= de: t
=C2=A0 minibuffer-regexp-mode: t
=C2=A0 line-number-mode: t
= =C2=A0 indent-tabs-mode: t
=C2=A0 transient-mark-mode: t
=C2=A0 auto-= composition-mode: t
=C2=A0 auto-encryption-mode: t
=C2=A0 auto-compre= ssion-mode: t

Load-path shadows:
None found.

Features:
= (shadow sort mail-extr emacsbug message mailcap yank-media puny dired
di= red-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068
e= pg-config gnus-util text-property-search time-date subr-x mm-decode
mm-b= odies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader
sendm= ail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils python
rx p= roject byte-opt gv bytecomp byte-compile compat pcase comint
ansi-osc ri= ng ansi-color cl-seq go-ts-mode treesit vc-git diff-mode
easy-mmode vc-d= ispatcher cl-loaddefs cl-lib rmc iso-transl tooltip cconv
eldoc paren el= ectric uniquify ediff-hook vc-hooks lisp-float-type
elisp-mode mwheel te= rm/ns-win ns-win ucs-normalize mule-util
term/common-win tool-bar dnd fo= ntset image regexp-opt fringe
tabulated-list replace newcomment text-mod= e lisp-mode prog-mode register
page tab-bar menu-bar rfn-eshadow isearch= easymenu timer select
scroll-bar mouse jit-lock font-lock syntax font-c= ore term/tty-colors
frame minibuffer nadvice seq simple cl-generic indon= esian philippine
cham georgian utf-8-lang misc-lang vietnamese tibetan t= hai tai-viet lao
korean japanese eucjp-ms cp51932 hebrew greek romanian = slovak czech
european ethiopic indian cyrillic chinese composite emoji-z= wj charscript
charprop case-table epa-hook jka-cmpr-hook help abbrev oba= rray oclosure
cl-preloaded button loaddefs theme-loaddefs faces cus-face= macroexp
files window text-properties overlay sha1 md5 base64 format en= v
code-pages mule custom widget keymap hashtable-print-readable backquot= e
threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs)
Memory information:
((conses 16 104850 12135) (symbols 48 7868 0) (= strings 32 21254 2120)
=C2=A0(string-bytes 1 586116) (vectors 16 14537)<= br>=C2=A0(vector-slots 8 156722 9447) (floats 8 27 34) (intervals 56 5547 0= )
=C2=A0(buffers 992 13))
--000000000000ad950206159e6175--