From: Roi Martin <jroi.martin@gmail.com>
To: 75362@debbugs.gnu.org
Subject: bug#75362: 29.4; go-ts-mode.el: wrong indentation inside var list
Date: Sat, 04 Jan 2025 16:40:18 +0100 [thread overview]
Message-ID: <87h66e8u59.fsf@gmail.com> (raw)
When using the Go tree-sitter grammar v0.23.4 from
https://github.com/tree-sitter/tree-sitter-go.git, indentation inside
var lists does not work correctly.
For instance, the following code is indented as:
```
var (
one = 1
)
```
Instead of:
```
var (
one = 1
)
```
Just in case it can help, I think this stopped working with grammar
version `v0.21.1`, that introduced `var_spec_list`:
https://github.com/tree-sitter/tree-sitter-go/compare/v0.21.0...v0.21.1
Please, take it with a pinch of salt because I'm not very familiar with
tree-sitter.
In GNU Emacs 29.4 (build 1, x86_64-redhat-linux-gnu, GTK+ Version
3.24.43, cairo version 1.18.0) of 2024-10-10 built on
4825182c94fc4195b65c80c30f523a16
System Description: Fedora Linux 41 (Workstation Edition)
Configured using:
'configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --program-prefix=
--disable-dependency-tracking --prefix=/usr --exec-prefix=/usr
--bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc
--datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64
--libexecdir=/usr/libexec --localstatedir=/var --runstatedir=/run
--sharedstatedir=/var/lib --mandir=/usr/share/man
--infodir=/usr/share/info --with-cairo --with-dbus --with-gif
--with-gpm=no --with-harfbuzz --with-jpeg --with-json --with-modules
--with-native-compilation=aot --with-pgtk --with-png --with-rsvg
--with-sqlite3 --with-tiff --with-tree-sitter --with-webp --with-xpm
build_alias=x86_64-redhat-linux-gnu host_alias=x86_64-redhat-linux-gnu
CC=gcc 'CFLAGS=-DMAIL_USE_LOCKF -O2 -flto=auto -ffat-lto-objects
-fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
-fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer ' 'LDFLAGS=-Wl,-z,relro -Wl,--as-needed
-Wl,-z,pack-relative-relocs -Wl,-z,now
-specs=/usr/lib/rpm/redhat/redhat-hardened-ld
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -Wl,--build-id=sha1
-specs=/usr/lib/rpm/redhat/redhat-package-notes '
PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig CXX=g++
'CXXFLAGS=-O2 -flto=auto -ffat-lto-objects -fexceptions -g
-grecord-gcc-switches -pipe -Wall -Werror=format-security
-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong
-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
-fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer
-mno-omit-leaf-frame-pointer ''
Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY
PDUMPER PGTK PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF
TOOLKIT_SCROLL_BARS TREE_SITTER WEBP XIM GTK3 ZLIB
Important settings:
value of $LC_MONETARY: en_IE.UTF-8
value of $LC_NUMERIC: en_IE.UTF-8
value of $LC_TIME: en_IE.UTF-8
value of $LANG: en_US.UTF-8
value of $XMODIFIERS: @im=ibus
locale-coding-system: utf-8-unix
Major mode: Go
Minor modes in effect:
eglot--managed-mode: t
flymake-mode: t
denote-menu-bar-mode: t
server-mode: t
icomplete-mode: t
fido-mode: t
tooltip-mode: t
global-eldoc-mode: t
eldoc-mode: t
show-paren-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
blink-cursor-mode: t
column-number-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:
/home/n/.emacs.d/elpa/transient-20250103.1731/transient hides /usr/share/emacs/29.4/lisp/transient
Features:
(shadow sort mail-extr emacsbug message puny rfc822 mml mml-sec epa
derived epg rfc6068 epg-config gnus-util mm-decode mm-bodies mm-encode
mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mail-utils yank-media
markdown-mode color noutline outline time-date files-x find-dired grep
eglot external-completion array filenotify jsonrpc ert ewoc debug
backtrace find-func flymake-proc flymake thingatpt compile
text-property-search comint ansi-osc ansi-color imenu go-ts-mode treesit
dired-aux denote xref project ring comp comp-cstr warnings cl-extra
help-mode server rx dired dired-loaddefs icomplete cus-edit pp cus-load
icons wid-edit easy-mmode clang-rename clang-include-fixer let-alist
clang-format xml denote-autoloads elfeed-autoloads forge-autoloads
closql-autoloads emacsql-autoloads geiser-chez-autoloads
geiser-guile-autoloads geiser-autoloads ghub-autoloads htmlize-autoloads
magit-autoloads pcase magit-section-autoloads dash-autoloads
markdown-mode-autoloads racket-mode-autoloads tmr-autoloads
transient-autoloads treepy-autoloads with-editor-autoloads info
compat-autoloads yaml-autoloads zig-mode-autoloads reformatter-autoloads
package browse-url url url-proxy url-privacy url-expand url-methods
url-history url-cookie generate-lisp-file url-domsuf url-util mailcap
url-handlers url-parse auth-source cl-seq eieio eieio-core cl-macs
password-cache json subr-x map byte-opt gv bytecomp byte-compile
url-vars cl-loaddefs cl-lib rmc iso-transl tooltip cconv eldoc paren
electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/pgtk-win pgtk-win term/common-win pgtk-dnd 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 dbusbind inotify
dynamic-setting system-font-setting font-render-setting cairo gtk pgtk
multi-tty make-network-process native-compile emacs)
Memory information:
((conses 16 198588 19413)
(symbols 48 16484 6)
(strings 32 50057 3480)
(string-bytes 1 1645981)
(vectors 16 31794)
(vector-slots 8 605866 18429)
(floats 8 196 642)
(intervals 56 753 136)
(buffers 984 20))
next reply other threads:[~2025-01-04 15:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-04 15:40 Roi Martin [this message]
2025-01-05 22:05 ` bug#75362: 29.4; go-ts-mode.el: wrong indentation inside var list Randy Taylor
2025-01-08 6:18 ` Yuan Fu
2025-01-08 13:02 ` Eli Zaretskii
2025-01-08 13:20 ` Randy Taylor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h66e8u59.fsf@gmail.com \
--to=jroi.martin@gmail.com \
--cc=75362@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).