unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#61006: 29.0.60; Wrong indentation in go-ts-mode
@ 2023-01-22 10:00 sskostyaev
  2023-01-25  2:35 ` Randy Taylor
  0 siblings, 1 reply; 10+ messages in thread
From: sskostyaev @ 2023-01-22 10:00 UTC (permalink / raw)
  To: 61006

Hi. Thank you all for great work.
In go-ts-mode indentation breaks in function or method definition if
arguments placed on separate lines like this:
```
func transform(
s string,
) string {
```
This code should be indented like this:
```
func transform(
	s string,
) string {
```
Also `go-ts-mode-indent-offset' should be 8 by default. In go world
there is gofmt which is a real standart for code indentation. It would
be great if emacs will provide the same indentation out of the box.

There is also other issue - sometimes go-ts-mode syntax highliting
breaks when I actively use it with `lsp-mode` - refactorings, auto
formatting etc. But I can't reproduce it with `eglot`.

In GNU Emacs 29.0.60 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 3.24.36, cairo version 1.17.6) of 2023-01-11 built on feofanlaptop
Repository revision: 384504edf35751eec2be9b52be5d3b250217d68f
Repository branch: makepkg
System Description: Arch Linux

Configured using:
 'configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib
 --localstatedir=/var --mandir=/usr/share/man --with-gameuser=:games
 --with-modules --without-libotf --without-m17n-flt --without-gconf
 --with-native-compilation=yes --with-native-compilation=aot --with-
pgtk
 --without-xaw3d --with-sound=no --with-tree-sitter --without-gpm
 --without-compress-install
 '--program-transform-name=s/\([ec]tags\)/\1.emacs/'
 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt'
 CPPFLAGS=-D_FORTIFY_SOURCE=2
 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG
JSON
LCMS2 LIBSYSTEMD LIBXML2 MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER
PGTK
PNG RSVG SECCOMP SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER
WEBP XIM GTK3 ZLIB

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: ru_RU.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix

Major mode: Go

Minor modes in effect:
  shell-dirtrack-mode: t
  eglot--managed-mode: t
  pixel-scroll-precision-mode: t
  flymake-mode: t
  icomplete-vertical-mode: t
  icomplete-mode: t
  electric-pair-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
  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 find-dired go-ts-mode treesit face-
remap
display-line-numbers files-x hippie-exp misearch multi-isearch shell
pcomplete vc-dir log-edit message sendmail mailcap yank-media puny
dired
dired-loaddefs rfc822 mml mml-sec epa epg rfc6068 epg-config gnus-util
mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 mm-
util
ietf-drums mail-prsvr mailabbrev mail-utils gmm-utils mailheader add-
log
vc-hg vc-bzr vc-src vc-sccs vc-cvs vc-rcs log-view pcvs-util smerge-
mode
diff vc vc-git diff-mode vc-dispatcher tabify apropos cus-edit cus-
start
cus-load wid-edit time dune skeleton vc-svn eglot external-completion
array filenotify jsonrpc ert ewoc debug backtrace url-util url-parse
auth-source eieio eieio-core password-cache json map url-vars imenu
tuareg tuareg-compat tuareg-opam smie find-file pixel-scroll cua-base
gopcaml-mode merlin-xref xref merlin-cap merlin easy-mmode advice pcase
crm ocp-indent cl gopcaml bookmark pp edmacro kmacro derived find-func
use-package-core time-date checkdoc lisp-mnt flymake-proc flymake
project byte-opt compile text-property-search comint ansi-osc ansi-
color
ring thingatpt comp comp-cstr warnings icons subr-x rx cl-seq cl-macs
gv
cl-extra help-mode bytecomp byte-compile icomplete cl-loaddefs cl-lib
elec-pair misterioso-theme 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
lcms2 multi-tty make-network-process native-compile emacs)

Memory information:
((conses 16 324901 69046)
 (symbols 48 17609 6)
 (strings 32 55854 8316)
 (string-bytes 1 1941813)
 (vectors 16 45873)
 (vector-slots 8 1509242 228698)
 (floats 8 261 571)
 (intervals 56 23782 309)
 (buffers 984 54))

-- 
Best regards,
Sergey Kostyaev





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

end of thread, other threads:[~2023-01-26  8:30 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-22 10:00 bug#61006: 29.0.60; Wrong indentation in go-ts-mode sskostyaev
2023-01-25  2:35 ` Randy Taylor
2023-01-25  2:46   ` Randy Taylor
2023-01-25  4:06     ` sskostyaev
2023-01-26  2:39       ` Randy Taylor
2023-01-26  8:30         ` Eli Zaretskii
2023-01-25  9:54   ` sskostyaev
2023-01-25 10:13     ` sskostyaev
2023-01-26  2:41       ` Randy Taylor
2023-01-26  4:43         ` Sergey Kostyaev

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